\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 value of $f(x,y)=\sin x \sin y \sin (x+y)$

Over the triangle bounded by $x=0$, $y=0$ and $x+y=\pi$.


\textbf{Answer}

It can easily be seen that $f(x,y)=0$ on the boundary of the triangle,
and that f(x,y)>0 at all points inside the triangle. So the minimum
value of $f$ on the triangle is zero, with the maximum point at some
point inside.

For critical points inside the triangle:
\begin{eqnarray*}
0 = f_1(x,y) & = & \cos x \sin y \sin(x+y)\\
& & +\sin x \sin y \cos (x+y)\\
0 = f_2(x,y) & = & \sin x \cos y \sin (x+y)\\
& & + \sin x \sin y \cos (x+y)\\
& & \\
\Rightarrow \cos x \sin y & = & \cos y \sin x
\end{eqnarray*}
So $x=y$ for critical points inside the triangle, and also that
\begin{eqnarray*}
\cos x \sin x \sin 2x +\sin^2 x \cos 2x & = & 0\\
2\sin^2 x\cos^2 x + 2\sin^2 \cos^2 x - \sin^2 x & = & 0\\
4\cos^2 x & = & 1
\end{eqnarray*}
\begin{eqnarray*}
\Rightarrow \cos x & =& \pm 1/2\\
x & = & \pm \pi/2
\end{eqnarray*}
The critical point inside the triangle is $(\pi/3, \pi/3)$, with
$f=3\sqrt{3}/8$ being the maximum value of $f$ in the triangle.

\end{document}

