1

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.

  • 6
    What is the question? – George Giapitzakis Jul 17 '23 at 12:27
  • @GiorgosGiapitzakis What do you mean ? The question is clear. –  Jul 17 '23 at 14:09
  • The problem itself is clearly written, but you are not asking a question. If you want someone to verify your solution, state it clearly and add the appropriate tag. If you are looking for a different approach or something else, make sure to clarify that in the question. – George Giapitzakis Jul 17 '23 at 14:29
  • @GiorgosGiapitzakis Ah, I see. Okay, thanks for that. I'll do just that. –  Jul 17 '23 at 14:37

3 Answers3

7

Perhaps another solution $$\begin{align} L &:=xy+2yz\\ &=y(x+2z)\le |y| \sqrt{(x^2+z^2)(1+2^2)} \hspace{1cm}\text{Cauchy–Schwarz inequality}\\ &\le \sqrt{5}\cdot |y|\cdot\sqrt{(x^2+z^2)} \le \sqrt{5}\cdot \frac{y^2 +(x^2+z^2)}{2}=18\sqrt{5} \hspace{1cm}\text{AM-GM inequality} \\ \end{align}$$ The equality occurs if and only if $\frac{x}{1} = \frac{z}{2}$, $y^2 = x^2+z^2$ and $(x,y,z)$ have the same sign, that is $$(x,y,z) =\left(\pm\sqrt{\frac{18}{5}},\pm\sqrt{18},\pm\sqrt{\frac{4\cdot 18}{5}} \right)$$

NN2
  • 20,162
2

NN2 gave a very good answer. I am providing the solution to the general problem instead.

Let us consider the problem $$ \max_{x\in\mathbb{R}^n} x^TPx\text{ such that }x^TQx=r^2 $$ where $P$ is a symmetric matrix, $Q$ is positive definite and $r\ne0$ is a real scalar.

We can consider the following Lagrangian function

$$ L(x,\lambda)=\max_{x\in\mathbb{R}^n} x^T(P-\lambda Q)x+\lambda r^2 $$ where $\lambda\in\mathbb{R}$.

The maximum will be finite if and only if $P-\lambda Q$ is negative semidefinite, which also makes the problem concave in $x$. Therefore, the dual problem is given by

$$ \min_{\lambda\in\mathbb{R}} \lambda r^2 \text{ such that }P-\lambda Q\preceq0. $$

This can be reformulated in terms of the generalized eigenvalue problem for the pair $(P,Q)$. Since $Q$ is invertible and positive definite, then we can consider the Cholesly factorization $Q=R^TR$ to get that $R^{-T}PR^{-1}-\lambda I$ must be negative definite, or, in other words that that $\lambda^*=\max\mathrm{eig}(R^{-T}PR^{-1})$ and we get that the maximum of the original optimization problem is equal to

$$\lambda^*r^2.$$

If we apply to the current, problem we have that $\lambda^*=\sqrt{5}/2$ and we get that the maximum is $18\sqrt{5}$.

KBS
  • 7,903
0

By AM-GM inequality, we get $$[x^2+(1/5)y^2]/2\ge\sqrt{x^2(1/5)y^2}=|xy|/\sqrt5\tag1$$ and $$[z^2+(4/5)y^2]/2\ge\sqrt{(4/5)y^2z^2}=2|yz|/\sqrt5.\tag2$$ Now, (1)+(2) we get $$[x^2+y^2+z^2]/2=18\ge[xy+2yz]/\sqrt5.$$ Therefore, $\max f(x,y,z)=18\sqrt5$.

Anne Bauval
  • 49,005
Morgan
  • 11