\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(1-x-y)$$

Over the triangle with vertices $(0,0)$, $(1,0)$ and $(0,1)$.


\textbf{Answer}

It can easily be seen that $f(x,y)=0$ on all three of the boundary
segments, and that $f(x,y)>0$ inside the triangle, therefore maximum
value of $f$ must occur at a critical point inside the triangle.

For critical points
\begin{eqnarray*}
0 & = & f_1(x,y) = y(1-2x-y)\\
0 & = & f_2(x,y) = x(1-x-2y)
\end{eqnarray*}
And so the only critical points are $(0,0)$, $(1,0)$ and
$(0,1)$ and $(1/3,1/3)$. These are all on the boundary of the
triangle, except for $(1/3,1/3)$ which is inside.

The maximum value of $f$ over the triangle is
$$f(1/3, 1/3)=\frac{1}{27}$$ 

\end{document}

