\documentclass{article}

%\usepackage{teaching}

\title{Mathematical Methods: Tutorial sheet 9}

\date{10 December 2004} 

\author{Peter Harrison}


\renewcommand{\baselinestretch}{1}   % {1,1.25,1.667} = % single/1.5/double line spacing

\newcommand{\answerblock}[1]{{\bf Solutions:}\nopagebreak[1]#1}
\usepackage{mathchars}

\newcommand{\nat}{\bbbn}
\newcommand{\rat}{\bbbq}
\newcommand{\real}{\bbbr}
\newcommand{\integers}{\bbbz}
\newcommand{\complex}{\ensuremath{\bbbc}}

%\renewcommand{\rat}{Q \!\!\!\! O}
%\renewcommand{\integers}{Z \!\!\! Z}
\renewcommand{\complex}{\cal C}

%\renewcommand{\answerblock}[1]{}
\newcommand{\bcomment}[1]{}

\newcommand{\mtx}[4]{\left(\begin{array}{rr}#1&#2\\#3&#4\end{array}\right)}
\newcommand{\cmtx}[4]{\left(\begin{array}{cc}#1&#2\\#3&#4\end{array}\right)}
\newcommand{\Bmtx}[9]{\left(\begin{array}{rrr}#1&#2&#3\\#4&#5&#6\\#7&#8&#9\end{array}\right)}
\newcommand{\Bcmtx}[9]{\left(\begin{array}{ccc}#1&#2&#3\\#4&#5&#6\\#7&#8&#9\end{array}\right)}
\newcommand{\vcr}[2]{\left(\begin{array}{r}#1\\#2\end{array}\right)}
\newcommand{\cvcr}[2]{\left(\begin{array}{c}#1\\#2\end{array}\right)}
\newcommand{\Bvcr}[3]{\left(\begin{array}{r}#1\\#2\\#3\end{array}\right)}
\newcommand{\Bcvcr}[3]{\left(\begin{array}{c}#1\\#2\\#3\end{array}\right)}
\newcommand{\zeromtx}{\left(\begin{array}{rr}0&0\\0&0\end{array}\right)}
\newcommand{\identitymtx}{\left(\begin{array}{rr}1&0\\0&1\end{array}\right)}
\newcommand{\determinant}[1]{\left| #1 \right|}


\newcommand{\pdiff}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pdiffF}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pdiffFII}[3]{\frac{\partial^2 #1}{\partial #2 \partial #3}}
\newcommand{\pdiffFs}[2]{\frac{\partial^2 #1}{\partial^2 #2}}
\newcommand{\diff}[1]{\mathrm{\frac{d}{d\mathit{#1}}}}
\newcommand{\diffF}[2]{\mathrm{\frac{d\mathit{#1}}{d\mathit{#2}}}}
\newcommand{\diffII}[1]{\mathrm{\frac{d^2}{d\mathit{#1}^2}}}
\newcommand{\indintg}[2]{\int #1 \, \mathrm{d}#2}
\newcommand{\intg}[4]{\int_{#3}^{#4} #1 \, \mathrm{d}#2}
\newcommand{\intgd}[4]{\int\!\!\!\!\int_{#4} #1 \, \mathrm{d}#2 \, \mathrm{d}#3}


\newcommand{\vi}{\vec{i}}
\newcommand{\vj}{\vec{j}}
\newcommand{\vk}{\vec{k}}


\begin{document}
\maketitle
\noindent
{\bf All questions are unassessed.  This is a {\em very} hard tutorial sheet which
is intended for detailed study with tutors.  You will {\em not} get exam questions
on this material, but it is an important link with techniques in other courses:
any that use complex functions and/or optimisation.}

\bigskip

{\bf Complex and 2-variable differentiation}

\begin{enumerate}

\item
\begin{enumerate}
\item Given that the complex functions $f(z), g(z)$ are differentiable, show
that the following functions are differentiable:
\begin{enumerate}
\item $f(z)g(z)$.\\  Start your proof like this:\\

``Let $z=x+iy$, $f(z) = p(x,y)+iq(x,y)$ and $g(z)=s(x,y)+it(x,y)$ where the
functions
$p,q,s,t$ are real.  The Cauchy-Riemann equations for $f(z)$ and $g(z)$ give:
$p_x=q_y,~~p_y=-q_x,~~s_x=t_y,~~s_y=-t_x$ where the subscripts $x,y$ denote
partial  differentiation with respect to $x,y$ respectively.

Now let $h(z) = f(z)g(z) = u(x,y)+iv(x,y)$ for real functions $u,v$.  Then:
$u = ps-qt ~~\mbox{and}~~ v=pt+qs$.''\\\\
You have to prove that $u_x=v_y$ and $u_y=-v_x$ using the Cauchy Riemann
equations for
$f(z)$ and
$g(z)$.\\

\item $\sqrt{f(z)}$.  \\Start like this:\\

``Let $z=x+iy$, $f(z) = p(x,y)+iq(x,y) = re^{i\theta}$ where $r^2=p^2+q^2$
and $\tan \theta = q/p$.  Let $h(z) =
\sqrt{f(z)} = u(x,y)+iv(x,y) = r^{1/2}e^{i\theta/2}$. 
Thus, $u(x,y) = r^{1/2}\cos \theta/2$ and $v(x,y)= r^{1/2}\sin \theta/2$.''\\\\
{\em You may assume that the Cauchy-Riemann equations for $f(z)$ imply that }
$r_x = r\theta_y,\;\;r_y=-r\theta_x$.\\

\item (Hard!) $f^{-1}(z)$.
\end{enumerate}


\item Show that the functions $h(z)$ defined by 
\begin{enumerate}
\item $h(z)=\mathrm{Arg}(z)$
\item $h(z)=\Re(z)$
\item $h(z)=\Im(z)$
\end{enumerate}
 are {\em not} differentiable

\end{enumerate}

\answerblock{
\begin{enumerate}
\item Let $z=x+iy$, $f(z) = p(x,y)+iq(x,y)$ and $g(z)=s(x,y)+it(x,y)$ where the
functions
$p,q,s,t$ are real.  The Cauchy-Riemann equations for $f(z)$ and $g(z)$ give:
$p_x=q_y,~~p_y=-q_x,~~s_x=t_y,~~s_y=-t_x$ where the subscripts $x,y$ denote
partial  differentiation with respect to $x,y$ respectively.

Let $h(z) = f(z)g(z) = u(x,y)+iv(x,y)$ for real functions $u,v$.  Then:
$$u = ps-qt ~~\mbox{and}~~ v=pt+qs$$
Thus, $$u_x=p_xs+ps_x-q_xt-qt_x=q_ys+pt_y-(-p_y)t-q(-s_y)=v_y$$ and 
$$u_y=p_ys+ps_y-q_yt-qt_y=-q_xs-pt_x-p_xt-qs_x=-v_x$$
Thus the C-R equations are satisfied for $h(z)$ which is therefore differentiable.

\item Let $z=x+iy$, $f(z) = p(x,y)+iq(x,y) = re^{i\theta}$ where $r^2=p^2+q^2$
and $\tan \theta = q/p$.  Let $h(z) =
\sqrt{f(z)} = u(x,y)+iv(x,y) = r^{1/2}e^{i\theta/2}$. 
Thus, $u(x,y) = r^{1/2}\cos \theta/2$ and $v(x,y)= r^{1/2}\sin \theta/2$.  Hence:
\begin{eqnarray*}
u_x &=& (1/2) r^{-1/2}r_x\cos \theta/2 - r^{1/2} (\theta_x/2) \sin \theta/2 \\
&=& (r_x \cos\theta/2 - r\theta_x\sin \theta/2)/(2r^{1/2}) \\
u_y &=& (1/2) r^{-1/2}r_y\cos \theta/2 - r^{1/2} (\theta_y/2) \sin \theta/2 \\
&=& (r_y \cos\theta/2 - r\theta_y\sin \theta/2)/(2r^{1/2}) \\
v_x &=& (1/2) r^{-1/2}r_x\sin \theta/2 + r^{1/2} (\theta_x/2) \cos \theta/2 \\
&=& (r_x \sin\theta/2 + r\theta_x\cos \theta/2)/(2r^{1/2}) \\
v_y &=& (1/2) r^{-1/2}r_y\sin \theta/2 + r^{1/2} (\theta_y/2) \cos \theta/2 \\
&=& (r_y \sin\theta/2 + r\theta_y\cos \theta/2)/(2r^{1/2}) 
\end{eqnarray*}

You can now {\em assume} that $r_x = r\theta_y,\;\;r_y=-r\theta_x$ but a proof is
the following. We know that
$r = \sqrt{p^2+q^2}$  and so  
$$r_x = \frac{pp_x+qq_x}{r},\;\; r_y =
\frac{pp_y+qq_y}{r}$$ Also $\theta = \arctan (q/p)$ so that
$$\theta_x =
\frac{q_x/p-qp_x/p^2}{1+(q/p)^2} = \frac{pq_x-qp_x}{r^2},\;\; 
\theta_y = \frac{pq_y-qp_y}{r^2} $$
Thus, by the Cauchy-Riemann equations for $f(z)$, 
$$r_x = r\theta_y,\;\;r_y=-r\theta_x$$

Substituting into the above equations for $u_x,u_y,v_x,v_y$, 
$$u_x=v_y \mbox{~and~} u_y=-v_x$$ and so the C-R equations are
satisfied for
$h(z)$ which is therefore differentiable.

\item Let $f(z) = u(x,y)+iv(x,y)$ so that $f^{-1}(u+iv)= x+iy$.  $u,v$ are
functions of $x,y$ and $x,y$ are functions of $u,v$.  Using the rules for change
of variables (lecture 9), and the facts that $u_u=v_v=1,u_v=v_u=0$,
we have 
\begin{eqnarray*}
u_u &=& u_xx_u+u_yy_u = 1 \\
u_v &=& u_xx_v+u_yy_v = 0 \\
v_u &=& v_xx_u+v_yy_u = 0 \\
v_v &=& v_xx_v+v_yy_v = 1 
\end{eqnarray*}
Solving the first and third equations for the two unknowns $x_u,y_u$ gives
$$x_u = \frac{v_y}{u_xv_y-v_xu_y}, y_u = \frac{-v_x}{u_xv_y-v_xu_y}$$ and
the second and fourth equations yield similarly
$$x_v = \frac{-u_y}{u_xv_y-v_xu_y}, y_v = \frac{u_x}{u_xv_y-v_xu_y}$$
Hence, $u_x=v_y \Rightarrow x_u=y_v$ and $u_y=-v_x \Rightarrow  x_v = -y_u$.
Thus the C-R equations are satisfied for $f^{-1}$ which is therefore
differentiable.

{\em Notice that this result implies part (b) since $f^2(z)$ is
diffrentiable by part (a) and square root is the inverse of square.}


\end{enumerate}
}




\item ({\bf Thanks to Jeremy Bradley and Berc Rustem}) 
A tank has width $x$, height
$y$ and depth $z$. Given that $x$,
  $y$ and $z$ are constrained by $x+y+z=9$, find the values of $x$,
  $y$ and $z$ which maximise the volume of the tank.
  
%%  Determine the dimensions of the rectangular tank which has the
%%  greatest possible volume given that the sum of its sides are
%%  restricted to $9$ metres in length.

\answerblock{
To maximise the volume of a tank of width $x$, height $y$ and depth
$z$, we need to maximise $V=xyz$ subject to:
\[
x+y+z=9
\]
In maximisation problems like this, we start by eliminating one
variable from volume equation, in this case $x$ (but could be any
variable), using the constraint $x+y+z=9$. So:
\[V=(9-y-z)yz=9yz-y^2z-yz^2\]
Just as when finding the stationary point (maximum or minimum) of a
one-variable function, we look at when the derivative is 0. So with
the two variable function, $V$, we look at the partial derivatives at
zero:
\begin{eqnarray*}
  \pdiffF{V}{y}&=&9z-2yz-z^2\\
  &=&(9-2y-z)z\\
  \pdiffF{V}{z}&=&9y-y^2-2yz\\
  &=&(9-y-2z)y\\
\end{eqnarray*}
At a maximum or minimum value of $V$ the partial derivatives are both
0. So $(9-2y-z)z=0$ and $(9-y-2z)y=0$ which means either $y=0$ and
$z=0$ (clearly an uninteresting solution where the volume is 0) or we
get the linear system:
\begin{eqnarray*}
  2y+z&=&9\\
  y+2z&=&9
\end{eqnarray*}
which has the solution $y=3$, $z=3$ and using the constraint $x+y+z=9$
as well we also get $x=3$.

We need to determine whether this is a maximum or a minimum value of
the function $V$. We do this using the Hessian matrix for $V$:
\[H=\mtx{\pdiffFs{V}{y}}{\pdiffFII{V}{y}{z}}{\pdiffFII{V}{z}{y}}{\pdiffFs{V}{z}}\]
In this case:
\[H=\cmtx{-2z}{9-2y-2z}{9-2y-2z}{-2y}\]
At the stationary point $y=z=3$, this becomes:
\[H=\cmtx{-6}{-3}{-3}{-6}\]

If $y=z=3$ is a maximum then Hessian is negative definite at
this point\footnote{If the point were a minimum, then the matrix would
be positive definite, i.e. the eigenvalues would both be positive.}. A matrix is
{\em negative definite} if its eigenvalues are all negative.

Eigenvalues of $H$ are found by looking for values of $\lambda$ in
$|H-\lambda I|=0$, i.e.
\[|H-\lambda I|=\determinant{\cmtx{-6-\lambda}{-3}{-3}{-6-\lambda}}=0\]
Thus $(\lambda+6)^2-9=0$ or $\lambda^2+12\lambda+27=0$, the solutions
of which are:
\[\lambda = -3,-9\]
So:
\begin{itemize}
\item eigenvalues both negative
\item [$\Rightarrow$] Hessian is negative definite at $y=3$,$z=3$
\item [$\Rightarrow$] $y=3$,$z=3$ is a maximum solution to original problem
\end{itemize}
}


\end{enumerate}

\end{document}




