\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\usepackage{epsfig}
\begin{document}
\parindent=0pt

\begin{center}
\textbf{Applications of Partial Differentiation}

\textit{\textbf{Extremes within restricted domains}}
\end{center}

\textbf{Question}

Find the maximum and minimum values of

$$f(x,y,z) = xz +yz$$

Over the ball $x^2+y^2+z^2 \le 1$.


\textbf{Answer}

For interior critical points
\begin{eqnarray*}
0 = f_1 & = & z\\
0 = f_2 & = & z\\
0 = f_3 & = & x+y
\end{eqnarray*}
So all points on the line $z=0$, $x+y=0$ are critical points with
$f=0$.

Consider the boundary of the ball, $x^2+y^2+z^2=1$.
\begin{eqnarray*}
f(x,y,z) & = & (x+y)z\\
& = &\pm (x+y) \sqrt{(1+x^2+y^2)}\\
& = & g(x,y)
\end{eqnarray*}
With $g$ having the domain $x^2+y^2 \le 1$. On the boundary of this
domain, $g=0$. However, $g$ has both positive and negative values
within the domain, so only consider CPs of $g$ in $x^2+y^2<1$
\begin{eqnarray*}
0 = g_1 & = & \sqrt{1-x^x-y^2} +
\frac{(x+y)(-2x)}{2\sqrt{1-x^2-y^2}}\\
& = & \frac{1-x^2-y^2-x^2-xy}{\sqrt{1-x^2-y^2}}\\
0 = g_2 & = & \frac{1-x^2-y^2-xy-y^2}{\sqrt{1-x^2-y^2}}\\
& & \\
\Rightarrow 1 & = & 2x^2+y^2+xy \\
& = & x^2+2y^2+xy\\
\Rightarrow x^2 & = & y^2
\end{eqnarray*}
And so there are two cases: 

If $x=-y$
\begin{eqnarray*}
g & = & 0\\
\Rightarrow f & = & 0
\end{eqnarray*}

If $x=y$
\begin{eqnarray*}
2x^2+x^2+x^2 & = & 1\\
\Rightarrow x^2 & = & \frac{1}{4}\\
x & = & \pm \frac{1}{2}
\end{eqnarray*}
And so $g$ had four CPs, with $g=\pm 1/\sqrt{2}$.

\begin{eqnarray*}
\textrm{min}(f) & = & \frac{1}{\sqrt{2}}\\
\textrm{max}(f) & = & -\frac{1}{\sqrt{2}}
\end{eqnarray*}

\end{document}

