Maximum and minimum of the function $xy+z^2$

1k Views Asked by At

Find the maximum and minimum values of the function $f(x,y,z)=xy+z^2$ in the circumference obtained by intersections between the sphere $x^2+y^2+z^2=4$ and the plane $y-x=0$.

I did Lagrange and found the points $(0,0,\pm2)$ I would call them maximum values and that the function have no minimum values. Not sure if that's correct... Thanks.

Edit: Lagrange calculations:

$\begin{cases}f_x\rightarrow y=4x\gamma\\ f_y\rightarrow x=0\\ f_z\rightarrow 2z=2z\gamma\\ 2x^2+z^2=4 \end{cases}$

2

There are 2 best solutions below

4
On

You know that $x=y$ so you try to maximize/minimize $x^2+z^2$ with the constraint $2x^2+z^2=4$

But : $$x^2+z^2=4-x^2$$ so :

  • $x^2+z^2$ is maximal when $x^2$ is minimal and this is at $x=0$ and $z=\pm 2$.

  • $x^2+z^2$ is minimal when $x^2$ is maximal and this is at $x^2=2$ .This happens because : $$x^2 \leq \frac{1}{2} \cdot( 2x^2+z^2)=2$$ and this means that $x= \pm \sqrt{2}$ and $z=0$ .

The minimum is $2$ and it's achieved for $ \left (\pm \sqrt{2},\pm \sqrt{2},0 \right)$ and the maximum is $4$ achieved for $ \left (0,0,\pm 2 \right )$ .

0
On

The Lagrange calculation as you've written it is mixing equations from both the one-constraint and two-constraint versions.

If you choose to combine the information from the spherical constraint ($ \ x^2 \ + \ y^2 \ + \ z^2 \ = \ 4 \ $ ) and the planar constraint ( $ \ y \ - \ x \ = \ 0 \ \ \Rightarrow \ \ x \ = \ y \ $ ) , the function to be extremized becomes $$ \ f(x,y,z) \ = \ xy \ + \ z^2 \ \ \rightarrow \ \ \phi (x,z) \ = \ x^2 \ + \ z^2 \ \ , $$ subject to the single constraint $$ \ g(x,y,z) \ = \ x^2 \ + \ y^2 \ + \ z^2 \ = \ 4 \ \ \rightarrow \ \ \gamma (x,z) \ = \ 2x^2 \ + \ z^2 \ = \ 4 \ \ . $$

The Lagrange equations $ \ \nabla \phi \ \ = \ \ \lambda \ \nabla \gamma \ $ are then

$$ \ \phi_x \ = \ \lambda \ \gamma_x \ \ \Rightarrow \ \ 2x \ = \ \lambda \ · \ 4x \ \ \ , \ \ \ \phi_z \ = \ \lambda \ \gamma_z \ \ \Rightarrow \ \ 2z \ = \ \lambda \ · \ 2z \ \ . $$

It is generally not a good idea to solve such a system by simply cancelling factors across each equation; one should instead bring all terms to one side of each equation and consider the products of factors, thus:

$ ( \ 2 \ - \ 4 \lambda \ ) \ x \ = \ 0 \ \ \Rightarrow \ \ \lambda \ = \ \frac{1}{2} \ \ $ or $ \ \ x \ = \ 0 \ \ . $ In the latter case, we have

$$ x \ = \ 0 \ \ \Rightarrow \ \ y \ = \ x \ = \ 0 \ \ , \ \ z^2 \ = \ 4 \ \ \Rightarrow \ \ z \ = \ \pm 2 \ \ , $$

while in the former case,

$$ \lambda \ = \ \frac{1}{2} \ \ \Rightarrow \ \ 2z \ = \ \frac{1}{2} · 2z \ = \ z \ \ \Rightarrow \ \ z \ = \ 0 \ \ \Rightarrow \ \ 2x^2 \ = \ 4 \ \ \Rightarrow \ \ x \ = \ \pm \sqrt{2} \ = \ y \ \ . $$

Hence, there are four critical points, $ \ ( \ 0 \ , \ 0 \ , \ \pm 2 \ ) \ \ , $ at which $ \ f \ = \ 2^2 \ = \ 4 \ \ , \ $ and $ \ ( \ \pm \sqrt{2} \ , \ \pm \sqrt{2} \ , \ 0 \ ) \ \ , $ where $ \ f \ = \ (\pm \sqrt{2}) · (\pm \sqrt{2}) \ = \ 2 \ \ . $

$ $

Applying the two constraints individually, which then uses all three coordinate variables, we define the second constraint function $ \ h(x,y,z) \ = \ y \ - \ x \ = \ 0 \ \ . $ The corresponding Lagrange equations $ \ \nabla f \ \ = \ \ \lambda \ \nabla g \ + \ \mu \ \nabla h \ $ are now

$$ f_x \ = \ y \ = \ \lambda \ · \ 2x \ + \ \mu \ · \ (-1) \ \ \ , \ \ \ f_y \ = \ x \ = \ \lambda \ · \ 2y \ + \ \mu \ · \ 1 \ \ \ , \ \ \ f_z \ = \ 2z \ = \ \lambda \ · \ 2z \ + \ \mu \ · \ 0 \ \ . $$

This time, we'll start with the third equation, $ ( \ 2 \ - \ 2 \lambda \ ) \ z \ = \ 0 \ \ \Rightarrow \ \ \lambda \ = \ 1 \ \ $ or $ \ \ z \ = \ 0 \ \ . $ The latter case will bring us directly to the critical points $ \ ( \ \pm \sqrt{2} \ , \ \pm \sqrt{2} \ , \ 0 \ ) \ \ . $ The case for $ \ \lambda \ = \ 1 \ $ calls for a bit of "playing around" to find a satisfactory approach (as with other sorts of systems of equations, methods of solution are not always obvious). The third equation, $ \ 2z \ = \ 1 · 2z \ $ leaves $ \ z \ $ unspecified for the moment. The other equations become $ \ y \ = \ 1 · 2x \ - \ \mu \ $ and $ \ x \ = \ 1 · 2y \ + \ \mu \ \ . $ Solving for $ \ \mu \ $ gives us

$$ \mu \ \ = \ \ 2x \ - \ y \ \ = \ \ x \ - \ 2y \ \ \Rightarrow \ \ x \ = \ -y \ \ . $$

But our planar constraint requires that $ \ x \ = \ y \ $ , so it must be that $ \ \ x \ = \ y \ = \ 0 \ \ . $ (This incidentally tells us that $ \ \mu \ = \ 0 \ $ , but we don't actually care about that any longer.) The spherical constraint then produces the remaining critical points $ \ ( \ 0 \ , \ 0 \ , \ \pm 2 \ ) \ \ . $

$ $

For this particular problem, a method along the lines of what user252450 is much easier. We could simply note that after "substituting" $ \ y \ = \ x \ $ , we are looking for the extrema of the "distance-squared" from the origin, $ \ x^2 \ + \ z^2 \ $ , of the points on the ellipse $ \ 2x^2 \ + \ z^2 \ = \ 4 \ \ \rightarrow \ \ \frac{x^2}{( \sqrt{2})^2} \ \ + \ \ \frac{z^2}{2^2} \ \ = \ \ 1 \ \ . $ The largest distance-squared of $ \ 4 \ $ is reached for the endpoints $ \ ( \ 0 \ , \ \pm 2 \ ) \ $ of its major axis, with the smaller distance-squared of $ \ 2 \ $ attained at the endpoints of its minor axis, $ \ ( \ \pm \sqrt{2} \ , \ 0 \ ) \ \ . $