\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)=xy-y^2$$

On the disk $x^2+y^2\le 1$.


\textbf{Answer}

For critical points
\begin{eqnarray*}
0 & = & f_1(x,y) = y\\
0 & = & f_2(x,y) = x-2y
\end{eqnarray*}
So the only critical point is $(0,0)$. This lies inside the disk, with
$f(0,0)=0$.

The boundary of the disk is given by the equations for a circle
\begin{eqnarray*}
x & = & \cos t\\
y & = & \sin t\\
\textrm{with }-\pi \le t \le \pi & & 
\end{eqnarray*}
On this circle
\begin{eqnarray*}
g(t) & = & f(\cos t, \sin t) = \cos t \sin t -\sin^2t\\
& = & \frac{1}{2} \left [ \sin 2t + \cos 2t -1 \right ]\\
g(0) & = & g(2\pi) =0\\
g'(t) & = & \cos 2t - \sin 2t
\end{eqnarray*}

The critical points of $g$ must satisfy
\begin{eqnarray*}
\cos 2t & = & \sin 2t\\
\textrm{i.e. }\tan 2t & = & 1\\
& & \\
\textrm{So }2t & = & \pm\frac{\pi}{4}, \ \ \textrm{or }
\pm\frac{5\pi}{4}\\
\Rightarrow t & = & \pm \frac{\pi}{8}, \ \ \textrm{or }
\pm\frac{5\pi}{8}
\end{eqnarray*}

This gives
\begin{eqnarray*}
g \left ( \frac{\pi}{8} \right ) & = & \frac{1}{2\sqrt{2}} - \frac{1}{2}
+ \frac{1}{2\sqrt{2}}\\
& = & \frac{1}{\sqrt{2}}-\frac{1}{2} > 0\\
g \left ( -\frac{\pi}{8} \right ) & = & -\frac{1}{2\sqrt{2}}
-\frac{1}{2} + \frac{1}{2\sqrt{2}}\\
& = & -\frac{1}{2}\\
g \left ( \frac{5\pi}{8} \right ) & = & -\frac{1}{2\sqrt{2}} -
\frac{1}{2} - \frac{1}{\sqrt{2}}\\
& = & -\frac{1}{2\sqrt{2}} - \frac{1}{2}\\
g \left ( -\frac{5\pi}{8} \right ) & = & \frac{1}{2\sqrt{2}} -
\frac{1}{2} - \frac{1}{2\sqrt{2}}\\
& = & - \frac{1}{2}
\end{eqnarray*}

So, on the disk
\begin{eqnarray*}
\textrm{min}(f) & = & -\frac{1}{\sqrt{2}}-\frac{1}{2}\\
\textrm{max}(f) & = & \frac{1}{\sqrt{2}}-\frac{1}{2}
\end{eqnarray*}

\end{document}

