Lagrange Multiplier to find maximum and minimum

125 Views Asked by At

Question:

Find the maximum and minimum of the function $f(x,y,x)=3x^2 + 2xz + 5y^2 +3z^2$ on the sphere $x^2 + y^2 + z^2 = 25$

Attempt:

This seems that it should be solvable using the Lagrange multiplier method so my attempt is focused on that.

$f(x,y,x)=3x^2 + 2xz + 5y^2 +3z^2$

$g(x,y,z)=x^2+y^2+z^2-25$

$\nabla f = \lambda \nabla g$

$\nabla f = (6x+2z,10y,2x+6z)$

$\nabla g = (2x, 2y, 2z) $

therefore we can make a system of equations:

$6x+2z=\lambda (2x)$ [1]

$10y=\lambda (2y)$ [2]

$2x+6z= \lambda (2z)$ [3]

$x^2 + y^2 + z^2 = 25$ [4]

From equation [2] it is clear to see that $\lambda = 5$

Subbing $\lambda$ into eqn [1] and [3] yeilds

$6x + 2z = 10x$ [1]

$2x + 6z = 10z$ [3]

It is also clear to see that $x=z$

This however creates a contradiction because if $x$ and $z$ are equal $\lambda$ cannot be equal to $5$ it must be equal to $4$ as shown below

From eqn [1] subbing x=z yeilds

$6x + 2x = \lambda (2x)$

$\lambda = 4$

I am unsure what I am doing wrong that is resulting in this system of equations to be unsolvable I know for a fact this question has a solution and I don't see why using Lagrange multipliers wouldn't work.

Any help would be appreciated Thank you.

3

There are 3 best solutions below

0
On BEST ANSWER

Your mistakes:

  1. From equation [2] you get $ \lambda=5$ or $y=0$ !

  2. With $\lambda=5$ we get $x=z$ and then $x=z=0$, hence $y= \pm 5$.

  3. You have also to investigate the case $y=0$ (see 1.).

1
On

Hint: Solve your equation for the sphere for $$y^2$$ and your function will containes only two variables. $$y^2=25-x^2-z^2$$ so you will get $$f(x,\pm\sqrt{25-x^2-z^2},z)=3x^2+2xz+5(25-x^2-z^2)+3z^2$$

0
On

The function $ \ f(x,y,x) \ = \ 3x^2 \ + \ 2xz \ + \ 5y^2 \ + \ 3z^2 \ $ would have full symmetry about the origin, if it weren't for the "mixed-variable" term $ \ 2xz \ $ . Its effect is to "break" the symmetry so that the value of the function at points where $ \ x \ = \ z \ $ differs from the value where $ \ x = -z \ \ . $ We may then expect to find extremal points with coordinates $ \ ( \ \pm x \ , \ \pm y \ , \ \pm x \ ) \ $ and $ \ ( \ \pm x \ , \ \pm y \ , \ \mp x \ ) \ \ . $

Your system of Lagrange equations

$$ 6x+2z \ = \ \lambda · 2x \ \ , \ \ 10y \ = \ \lambda · 2y \ \ , \ \ 2x+6z \ = \ \lambda·2z \ \ $$

may be handled in a couple of different ways.

One of these is related to Fred's answer, in which we bring all terms to one side in each equation thus $$ (3 - \lambda) \ x \ + \ z \ = \ 0 \ \ , \ \ (5 - \lambda) \ y \ = 0 \ \ , \ \ x \ + \ (3 - \lambda) \ z \ = \ 0 \ \ . $$

This shows the division of the solution into two cases. The simpler of these is where $ \ \lambda = 5 \ \ , $ which as you found forces $ \ (3 - 5) \ x \ + \ z \ = \ 0 \ , \ 2x \ + \ (3 - 5) \ z \ = \ 0 \ \ \Rightarrow \ \ z = 2x \ , \ x = 2z \ \ , $ so that we have $ \ x = 0 \ , \ z = 0 \ \ \Rightarrow \ \ y^2 = 25 \ \ \Rightarrow \ \ y \ = \ \pm 5 \ \ . $ The function at these points has the value $ \ f(0 \ , \ \pm 5 \ , \ 0) \ = \ 5·5^2 \ = \ 125 \ \ . $

For $ \ y = 0 \ \ (\lambda \neq 5) \ , $ the first and third equations form a system $$ \begin{array}{cc} (3 - \lambda) \ x & + \ z & \ = \ 0 \\ x & + \ (3 - \lambda) \ z & \ = \ 0 \end{array} \ \ . $$

We will only have non-zero values for $ \ x \ $ and $ \ z \ $ when $ \ (3 - \lambda)^2 \ - \ 1 \ = \ 0 \ \ \Rightarrow \ \ \lambda \ = \ 2 \ , \ 4 \ \ . $ We then have $ \ \lambda = 2 \ \Rightarrow \ x + z \ = \ 0 \ \ $ or $ \ \ \lambda = 4 \ \Rightarrow \ x - z \ = \ 0 \ \ . $ Inserting this into the spherical constraint equation yields

$ \mathbf{\lambda \ = \ 4 \ :} \quad x \ = \ z \ \ \Rightarrow \ \ x^2 \ + \ 0 \ + \ z^2 \ = \ 25 \ \ \Rightarrow \ \ 2x^2 \ = \ 25 \ \ \Rightarrow \ \ x \ = \ z \ = \ \pm \frac{5}{\sqrt2} \ \ ; $

$ f(\pm \ x \ , \ 0 \ , \ \pm \ x) \ = \ 3x^2 \ + \ 2·(\pm \ x)^2 \ + \ 3x^2 \ \ = \ \ 8·x^2 $

$ \Rightarrow \ \ f \left(\pm \ \frac{5}{\sqrt2} \ , \ 0 \ , \ \pm \ \frac{5}{\sqrt2} \right) \ = \ 8·\left(\frac{25}{ 2} \right) \ = \ 100 $

$ \mathbf{\lambda \ = \ 2 \ :} \quad x \ = \ -z \ = \ \pm \frac{5}{\sqrt2} \ \ ; \ \ f(\pm \ x \ , \ 0 \ , \ \mp \ x) \ = \ 3x^2 \ + \ 2·(\pm \ x)·(\mp \ x) \ + \ 3x^2 \ \ = \ \ 4·x^2 $

$ \Rightarrow \ \ f \left(\pm \ \frac{5}{\sqrt2} \ , \ 0 \ , \ \mp \ \frac{5}{\sqrt2} \right) \ = \ 4·\left(\frac{25}{ 2} \right) \ = \ 50 \ \ . $

[We also see from this that $ \ \lambda = 3 \ $ immediately leads to all three coordinates being equal to zero. The origin is a critical point of the function, but we are only concerned with its behavior on the spherical surface.]

We conclude that the extremal values of our function on the sphere are given by $$ f(0 \ , \ \pm 5 \ , \ 0) \ = \ 125 \quad \mathbf{\text{ [ absolute maximum ] } } $$ and $$ f \left(\pm \ \frac{5}{\sqrt2} \ , \ 0 \ , \ \mp \ \frac{5}{\sqrt2} \right) \ = \ 50 \quad \mathbf{\text{[ absolute minimum ] } } \ \ . $$

Another approach that can be taken is to solve the original Lagrange equations for $ \ \lambda \ $ and not generally concern ourselves with its values:

$$ \lambda \ \ = \ \ \frac{6x \ + \ 2z}{2x} \ \ = \ \ \frac{2x \ + \ 6z}{2z} \ \ = \ \ \frac{10 \ y}{2 \ y} \ \ . $$

This can be interpreted in the following way. Solving the equation of the first pair of ratios leads to $ \ 3 \ + \ \frac{z}{x} \ = \ 3 \ + \ \frac{x}{z} \ \ \Rightarrow \ \ x^2 = z^2 \ \ , $ unless $ \ x = 0 \ , \ z = 0 \ \ . $ The last ratio gives us $ \ \lambda = 5 \ \ , $ unless $ \ y = 0 \ \ . $ Combining these with $ \ (3 - \lambda) \ x \ + \ z \ = \ 0 \ \ , \ \ (5 - \lambda) \ y \ = 0 \ \ , \ \ x \ + \ (3 - \lambda) \ z \ = \ 0 \ \ $ allows us to sort the cases as

$ \mathbf{\lambda \ = \ 5 \ :} \quad x \ = \ z \ = \ 0 \ \ \Rightarrow \ \ y \ = \ \pm \ 5 \quad \text{or} \quad \mathbf{\lambda \ \neq \ 5 \ :} \quad y = 0 \ \ \text{and} \ \ x = z \neq 0 \ \ \text{or} \ \ x = -z \neq 0 \ \ , $

with the rest of the calculations following as before.

$ \ \ $

It is reasonable to ask whether the value of the function $ \ f(0 \ , \ \pm 5 \ , \ 0) \ = \ 125 \ $ "fits together" with the extrema on the circle $ \ x^2 + z^2 \ = \ 25 \ \ , $ which is the intersection of the plane $ \ y = 0 \ $ with the constraint sphere. If we parametrize this circle by $ \ x \ = \ 5 \cos \theta \ , \ z \ = \ 5 \sin \theta \ \ , $ our function becomes

$$ f(x,0,z) \ = \ 3·(5 \cos \theta)^2 \ + \ 2·(5 \cos \theta)·(5 \sin \theta) \ + \ 5·0^2 \ + \ 3·(5 \sin \theta)^2 $$ $$ = \ 75·( \cos^2 \theta \ + \ \sin^2 \theta) \ + \ 50 · \sin \theta \ \cos \theta \ \ = \ 75 \ + \ 25 · \sin (2 \theta) \ \ . $$ We can see from this that the relative maxima occur at $ \ \theta \ = \ \frac{\pi}{4} \ , \ \frac{5\pi}{4} \ \ ( x = z ) \ \ $ and the relative minima at $ \ \theta \ = \ \frac{3\pi}{4} \ , \ \frac{7\pi}{4} \ \ ( x = -z ) \ \ . $

Applying the symmetry of the function and of the sphere, we can use "vertical planes" $ \ y \ = \ \pm Y_0 \ $ and examine the intersection circles $ \ x^2 + z^2 \ = \ 25 - Y_0^2 \ \ $ with radii $ \ R \ = \ \sqrt{25 - Y_0^2} \ \ . $ Their parametrization is $ \ x \ = \ R \cos \theta \ , \ R \ = \ 5 \sin \theta \ \ $ and the function on said circles is $$ f(x \ , \ \pm Y_0 \ , \ z) \ \ = \ \ 3·R^2·( \cos^2 \theta \ + \ \sin^2 \theta) \ + \ 5·Y_0^2 \ + \ 2·R^2 · \sin \theta \ \cos \theta $$ $$ = \ \ 3·(25 - Y_0^2) \ + \ 5·Y_0^2 \ + \ (25 - Y_0^2) · \sin (2 \theta) \ \ = \ \ (75 + 2Y_0^2) \ + \ (25 - Y_0^2) · \sin (2 \theta) \ \ . $$

We observe that when these planes become tangent to the sphere at $ \ Y_0 = \pm \ 5 \ \ , $ the function "collapses" to $ \ 75 \ + \ 2 · 5^2 \ + \ 0 · \sin (2 \theta) \ = \ 125 \ \ . $

Indeed, using the symmetry argument discussed at the start, we could have solved for the extremal points in this manner.