I want to find the maximum of
$ f(x, y, z) = xy + 2 y z $
subject to
$ x^2 + y^2 + z^2 = 36 $
My Approach:
The most direct way is to parameterize $(x, y, z)$ which is easy in this case because $(x,y,z)$ lie on a sphere centered at the origin with radius $6$. Therefore, using spherical parameterization,
$ (x, y, z) = 6 ( \sin \theta \cos \phi, \sin \theta \sin \phi, \cos \theta ) $
Hence our function becomes a function of $\theta$ and $\phi$
$f(\theta, \phi) = 36 ( \sin^2 \theta \cos \phi \sin \phi + 2 \sin \theta \cos \theta \sin \phi ) $
Using $\sin^2 \theta = \dfrac{1}{2} (1 - \cos(2 \theta) ) $
and $ 2 \sin \theta \cos \theta = \sin(2 \theta) $
The function now becomes,
$ f(\theta, \phi) = 9 \bigg( (1 - \cos(2 \theta)) \sin(2 \phi) + 4 \sin(2 \theta ) \sin \phi \bigg) $
Maximizing over $\theta$ first
$ f_1(\phi) = 9 \sqrt{ (1 - \cos(2 \phi))^2 + 16 \sin^2(\phi) } $
Using the identities mentioned above this simplifies to
$ f_1(\phi) = 9 \sqrt{ (1 - \cos(2 \phi) )^2 + 8 (1 - \cos(2 \phi) ) } $
Let $u = \cos(2 \phi) $, then basically we want to maximize
$ g(u) = u^2 - 10 u + 9 $
over $[-1, 1]$. It is easy to find that the maximum of $g$ is at $u = -1$ and the maximum is
$g_{Max} = 20 $
Thus the maximum of our function is
$ f_{Max} = 9 \sqrt{ 20 } = 18 \sqrt{5} \approx 40.25 $
Another method is one that requires finding the eigenvalues of the matrix
$ Q = \begin{bmatrix} 0 && \dfrac{1}{2} && 0 \\ \dfrac{1}{2} && 0 && 1 \\ 0 && 1 && 0 \end{bmatrix} $
The characteristic polynomial is
$ \lambda ( \lambda^2 - \dfrac{5}{4} ) = 0 $
Thus $\lambda_{Max} = \sqrt{\dfrac{5}{4}} = \dfrac{1}{2} \sqrt{5} $
Multiplying this by $36$ gives the answer as $ 18 \sqrt{5} $.
I look forward to alternative solutions, or comments on my solutions.
Thank you all.