next up previous
Next: About this document ...

Lagrange Multipliers
Page 793: Solutions to Problems 1, 3, 5, 9 and 11

1. Use the method of Lagrange multipliers to maximize $ x^3 y^5$ subject to the constraint $ x + y = 8$.


Answer: Let $ f(x,y) = x^3 y^5$ and $ g(x,y) = x + y - 8$. The points $ (x,y)$ which will maximize $ f(x,y)$ subject to the constraint $ g(x,y) = 0$ will be the set of points $ (x,y)$ that satisfy the equations $ \nabla f(x,y) = \lambda \nabla g(x,y)$ and $ g(x,y) = 0$. Writing out the system of three equations and three unknowns explicitly:

$\displaystyle 3 x^2 y^5$ $\displaystyle =$ $\displaystyle \lambda$ (1)
$\displaystyle 5 x^3 y^4$ $\displaystyle =$ $\displaystyle \lambda$ (2)
$\displaystyle x + y$ $\displaystyle =$ $\displaystyle 8.$ (3)

Suppose $ \lambda = 0$. Then eqn.(1) would be $ 3 x^2 y^5 = 0$ which would imply that either $ x = 0$ or $ y = 0$. (They cannot both be equal to 0, because that would contradict eqn.(3).) If $ x = 0$, then eqn.(3) says $ y = 8$. And if $ y = 0$, we would instead have from eqn.(3) that $ x = 8$. Either way, we get $ f(8, 0) = f(0, 8) = 0$.

Now suppose that $ \lambda \neq 0$. We can set equations (1) and (2) equal to each other and simplify:

$\displaystyle 3 x^2 y^5$ $\displaystyle =$ $\displaystyle 5 x^3 y^4$  
$\displaystyle 3 x^2 y^5 - 5 x^3 y^4$ $\displaystyle =$ 0  
$\displaystyle x^2 y^4 (3 y - 5 x)$ $\displaystyle =$ 0 (4)

Since $ \lambda \neq 0$, eqn.(1) implies that $ x \neq 0$, $ y \neq 0$. Therefore, for eqn.(4) to be true, it must be that $ 3 y - 5 x = 0$, and solving this equation for $ y$: $ y = \displaystyle{\frac{5}{3}} x$. Plugging this into eqn.(3) and solving for $ x$ yields:

$\displaystyle x + \frac{5}{3} x = 8 \Longrightarrow \frac{8}{3} x = 8 \Longrightarrow x = 3$    and therefore $\displaystyle y = 5.
$

And so we have $ f(3, 5) = 3^3 \cdot 5^5 = (27)\cdot (3,125) = 84,375.$ Since clearly $ f(3, 5) > f(8, 0)$    and $ f(0, 8)$, $ f(x,y)$ is maximized at the point $ (3, 5)$.


3. Find the distance from the origin to the plane $ x + 2 y + 2 z = 3,$

1.
using a geometric argument (no calculus)
2.
by reducing the problem to an unconstrained problem in two variables, and
3.
using the method of Lagrange multipliers.


Answer:

(i): From Example 7 on page 628, we know that the distance $ s$ from the point $ (x_0, y_0, z_0)$ to the plane whose equation is $ A x + B y + C z = D$ is given by the formula:

$\displaystyle s = \frac{\vert A x_0 + B y_0 + C z_0 - D\vert}{\sqrt{ A^2 + B^2 + C^2 }}.
$

And so, plugging in the appropriate numbers:

$\displaystyle s = \frac{\vert(1\cdot 0) + (2\cdot 0) + (2\cdot 0) - 3\vert}{\sqrt{1^2 + 2^2 + 2^2}}
= \frac{3}{\sqrt{9}} = \frac{3}{3} = 1.
$


(ii): The distance from any point on the plane to the origin is $ f(x, y, z) = \sqrt{x^2 + y^2 + z^2}$. This is the function I wish to minimize. To make Life (and taking derivatives) easier, I will instead minimize its square: $ F(x,y,z) = x^2 + y^2 + z^2$. The point $ (x, y, z)$ that minimizes $ F(x, y, z)$ will also certainly minimize $ f(x,y,z)$.

Let's solve the equation of the plane for $ z$: $ z = \displaystyle{\frac{1}{2}} ( 3 - x - 2 y )$, and then plug this $ z$ into $ F(x, y, z)$:

$\displaystyle F(x, y, z)$ $\displaystyle =$ $\displaystyle F\left(x, y, \frac{1}{2} ( 3 - x - 2 y ) \right)$  
  $\displaystyle =$ $\displaystyle x^2 + y^2 + {\left( \frac{1}{2} ( 3 - x - 2 y ) \right)}^2$  
  $\displaystyle =$ $\displaystyle x^2 + y^2 + \frac{1}{4} { ( 3 - x - 2 y ) }^2$  

Let that last equation equal $ g(x,y)$. I now need to find the critical points of $ g(x,y)$. Once I find the critical points, I plug them into $ g(x,y)$ and the smallest number I get will be the square of the minimum distance. (Remember, I'm minimizing the distance-squared function.)

To find the critical points, I have to find the $ (x,y)$ such that $ \nabla g(x, y) = 0 {\bf i} + 0 {\bf j}$. So the equations I need to solve are

$\displaystyle g_x (x, y)$ $\displaystyle =$ $\displaystyle -\frac{3}{2} + \frac{5}{2} x + y = 0$  
$\displaystyle g_y( x, y)$ $\displaystyle =$ $\displaystyle -3 + x + 4 y = 0.$  

Solving the above for $ x$ and $ y$: $ x = \displaystyle{\frac{1}{3}}$ and $ y = \displaystyle{\frac{2}{3}}$, and then we get $ \displaystyle{ g\left(\frac{1}{3}, \frac{2}{3}\right) = 1} $, and so the distance is 1.


(iii): As in part (ii), I'll instead minimize the distance-squared: $ F(x,y,z) = x^2 + y^2 + z^2$. The constraint I have is $ g(x, y, z) = x + 2 y + 2 z - 3 = 0$, and this means the system of equations I need to solve is

$\displaystyle 2 x$ $\displaystyle =$ $\displaystyle \lambda$ (5)
$\displaystyle 2 y$ $\displaystyle =$ $\displaystyle 2 \lambda$ (6)
$\displaystyle 2 z$ $\displaystyle =$ $\displaystyle 2 \lambda$ (7)
$\displaystyle x + 2 y + 2 z$ $\displaystyle =$ $\displaystyle 3$ (8)

Suppose $ \lambda = 0$. Then eqns.(5-7) would imply $ x = y = z = 0$. But then that would contradict eqn.(8): $ 0 + 0 + 0 = 3$. Therefore, we must have $ \lambda \neq 0$.

Since $ \lambda \neq 0$, setting eqn.(6) equal to eqn.(7) yields: $ 2 y = 2 z \Longrightarrow y = z$. (Note that to get this, I have to divide by $ \lambda$. Since I know $ \lambda \neq 0$, I can legally do so.) And using eqns.(6) and (5), I see that $ y = 2 x$. Substituting all this into eqn.(8) and solving:

$\displaystyle x + 2 (2 x) + 2 ( 2 x ) = 3 \Longrightarrow 9 x = 3 \Longrightarrow x = \frac{1}{3},
$

and so $ \displaystyle{ y = \frac{2}{3} \mbox{ and } z = \frac{2}{3} }$. And so (a big surprise here): $ \displaystyle{F\left(\frac{1}{3}, \frac{2}{3}, \frac{2}{3}\right) = 1}$ and that means the minimum distance is 1.


5. Use the Lagrange multiplier method to find the greatest and least distances from the point $ (2, 1, -2)$ to the sphere with the equation $ x^2 + y^2 + z^2 = 1.$


Answer: The distance from $ (x, y, z)$ to the point $ (2, 1, -2)$ is $ f(x, y, z) = \sqrt{ {(x-2)}^2 + {(y-1)}^2 + {(z+2)}^2 }$. This is the function I need to minimize and maximize subject to the constraint that $ g(x, y, z) = x^2 + y^2 + z^2 - 1 = 0$. Using the same reasoning given in the previous problem, I will instead minimize and maximize $ F(x, y, z) = {(x-2)}^2 + {(y-1)}^2 + {(z+2)}^2$.

Taking the appropriate derivatives, the system of equations I need to solve is

$\displaystyle 2 ( x - 2 ) = 2 x \lambda$ which simplifies to: $\displaystyle x (1 - \lambda) = 2$ (9)
$\displaystyle 2 ( y - 1 ) = 2 y \lambda$ which simplifies to: $\displaystyle y (1 - \lambda) = 1$ (10)
$\displaystyle 2 ( z + 2 ) = 2 z \lambda$ which simplifies to: $\displaystyle z (1 - \lambda) = -2$ (11)
$\displaystyle x^2 + y^2 + z^2 = 1$ which stays the same: $\displaystyle x^2 + y^2 + z^2 = 1.$ (12)

Now, eqns.(9-11) all imply that $ x, y, z \neq 0$. (Otherwise, we would have $ 0 = 2$.)

Since I know that $ x, y, z \neq 0$, I can legally divide both sides of eqn.(9) by $ x$, both sides of eqn.(10) by $ y$ and both sides of eqn.(11) by $ z$. (Before dividing, I need to first make sure that I'm not dividing by 0.) And so

$\displaystyle 1 - \lambda$ $\displaystyle =$ $\displaystyle \frac{2}{x}$ (13)
$\displaystyle 1 - \lambda$ $\displaystyle =$ $\displaystyle \frac{1}{y}$ (14)
$\displaystyle 1 - \lambda$ $\displaystyle =$ $\displaystyle -\frac{2}{z}$ (15)

Setting eqns.(13) and (15) equal to each other gets:

$\displaystyle \frac{2}{x} = -\frac{2}{z} \Longrightarrow z = -x
$

and from eqns.(13) and (14):

$\displaystyle \frac{2}{x} = \frac{1}{y} \Longrightarrow y = \frac{x}{2}.
$

Let's plug all this into eqn.(12):

$\displaystyle x^2 + {\left(\frac{x}{2}\right)}^2 + {(-x)}^2 = 1
\Longrightarrow...
... x^2 = 1 \Longrightarrow x^2 = \frac{4}{9}
\Longrightarrow x = \pm\frac{2}{3}.
$

The two points we need to check are $ \displaystyle{ \left( \frac{2}{3}, \frac{1}{3}, -\frac{2}{3} \right) }$ and $ \displaystyle{ \left( -\frac{2}{3}, -\frac{1}{3}, \frac{2}{3} \right) }$:
$\displaystyle F\left( \frac{2}{3}, \frac{1}{3}, -\frac{2}{3} \right)$ $\displaystyle =$ $\displaystyle 4$  
$\displaystyle F\left( -\frac{2}{3}, -\frac{1}{3}, \frac{2}{3} \right)$ $\displaystyle =$ $\displaystyle 16.$  

Therefore, the least distance from the point $ (2, 1, -2)$ to the unit sphere centered at the origin is $ \sqrt{4} = 2$, and the greatest distance is $ \sqrt{16} = 4$.


9. Find the maximum and minimum values of $ f(x, y, z) = x y z$ on the sphere $ x^2 + y^2 + z^2 = 12.$


Answer: The function we want to maximize and minimize is $ f(x, y, z) = x y z$, and the constraint we have is $ g(x, y, z) = x^2 + y^2 + z^2 - 12 = 0$. The system of equations we need to solve are

$\displaystyle y z$ $\displaystyle =$ $\displaystyle 2 x \lambda$ (16)
$\displaystyle x z$ $\displaystyle =$ $\displaystyle 2 y \lambda$ (17)
$\displaystyle x y$ $\displaystyle =$ $\displaystyle 2 z \lambda$ (18)
$\displaystyle x^2 + y^2 + z^2$ $\displaystyle =$ $\displaystyle 12.$ (19)

Suppose that $ \lambda = 0$. Then exactly two variables must be equal to 0. (E.g. Suppose $ x = 0$ and $ y, z \neq 0$. Then we'd get a contradiction from eqn.(16): $ y z = 0 $.) And they can't all be 0, because that would contradict eqn.(19). So no matter which variable is not equal to 0, we would have

$\displaystyle f(\pm\sqrt{12}, 0, 0) = f(0, \pm\sqrt{12}, 0) = f(0, 0, \pm\sqrt{12}) = 0.
$

The $ \pm\sqrt{12}$ comes from solving eqn.(19).

Now suppose that $ \lambda\neq 0.$ Let me multiply both sides of eqn.(16) by $ x$, both sides of eqn.(17) by $ y$, and both sides of eqn.(18) by $ z$, and add those three equations together:

$\displaystyle 3 x y z$ $\displaystyle =$ $\displaystyle 2 \lambda (x^2 + y^2 + z^2 )$  
$\displaystyle 3 x y z$ $\displaystyle =$ $\displaystyle 2 \lambda ( 12 )$  
$\displaystyle x y z$ $\displaystyle =$ $\displaystyle 8 \lambda.$ (20)

That last equation implies that $ x, y, z \neq 0$ (since $ \lambda \neq 0$) . Let me use eqn.(18) in eqn.(20) and solve for $ z$:
$\displaystyle x y z$ $\displaystyle =$ $\displaystyle 8 \lambda$  
$\displaystyle ( x y ) z$ $\displaystyle =$ $\displaystyle 8 \lambda$  
$\displaystyle ( 2 z \lambda ) z$ $\displaystyle =$ $\displaystyle 8 \lambda$  
$\displaystyle 2 z^2$ $\displaystyle =$ $\displaystyle 8$  
$\displaystyle z^2$ $\displaystyle =$ $\displaystyle 4$  
$\displaystyle z$ $\displaystyle =$ $\displaystyle \pm 2.$  

I can divide by $ \lambda$ in that fourth line because $ \lambda \neq 0$.

Similarly, I can use eqn.(17) in eqn.(20) and solve for $ y$: $ y = \pm 2$. And with eqn.(16) in eqn.(20), I can get $ x$: $ x = \pm 2$. And so there are a few possibilities. Let's make a table of the different combinations:

$ x$ $ y$ $ z$ $ f(x,y,z)$
2 2 2 8
2 2 -2 -8
2 -2 2 -8
2 -2 -2 8
-2 2 2 -8
-2 2 -2 8
-2 -2 2 8
-2 -2 -2 -8
Comparing all the numbers (e.g. $ -8$, 0 and $ 8$), we see that the minimum value of $ f(x,y,z)$ is $ -8$, and the maximum value is $ 8$.


11. Find the maximum and minimum values of the function $ f(x, y, z) = x$ over the curve of intersection of the plane $ z = x + y$ and the ellipsoid $ x^2 + 2 y^2 + 2 z^2 = 8$.


Answer: So we have to minimize and maximize the function $ f(x, y, z) = x$ subject to the two constraints $ g(x, y, z) = x + y - z = 0$ and $ h(x, y, z) = x^2 + 2 y^2 + 2 z^2 - 8 = 0$. Therefore, the equations we have to solve are $ \nabla f(x, y, z) = \lambda \nabla g(x, y, z) + \mu\nabla h(x,y,z)$, $ g(x, y, z) = 0$, and $ h(x, y, z) = 0$. That means, we solve

$\displaystyle 1$ $\displaystyle =$ $\displaystyle \lambda + 2 x\mu$ (21)
0 $\displaystyle =$ $\displaystyle \lambda + 4 y\mu$ (22)
0 $\displaystyle =$ $\displaystyle -\lambda + 4 z\mu$ (23)
$\displaystyle x + y$ $\displaystyle =$ $\displaystyle z$ (24)
$\displaystyle x^2 + 2 y^2 + 2 z^2$ $\displaystyle =$ $\displaystyle 8.$ (25)

Note that it must be the case that $ \mu \neq 0$. (If $ \mu = 0$, then eqn.(21) would say $ \lambda = 1$ and eqn.(22) would say $ \lambda = 0$, and we would get a contradiction.)

Since I know I can legally divide by $ \mu$, from eqns.(22) and (23) we have

$\displaystyle 4 y\mu = -4 z\mu \Longrightarrow y = -z
$

and using that in eqn.(24):

$\displaystyle x + (-z) = z \Longrightarrow x = 2 z.
$

Let's plug all this into eqn.(25):
$\displaystyle {(2 z)}^2 + 2 {(-z)}^2 + 2 z^2$ $\displaystyle =$ $\displaystyle 8$  
$\displaystyle 4 z^2 + 2 z^2 + 2 z^2$ $\displaystyle =$ $\displaystyle 8$  
$\displaystyle 8 z^2$ $\displaystyle =$ $\displaystyle 8$  
$\displaystyle z^2$ $\displaystyle =$ $\displaystyle 1$  
$\displaystyle z$ $\displaystyle =$ $\displaystyle \pm 1.$  

For $ z = 1$, we have $ x = 2$ and $ y = -1$, and $ f(2,-1,1) = 2$. For $ z = -1$, we have $ x = -2$ and $ y = 1$, and $ f(-2, 1, -1) = -2$. Therefore, the minimum value is -2, and the maximum value 2.

Figure 1: Joseph-Louis Lagrange (1736-1813)
\begin{figure}
\begin{center}
\epsfig{figure=Lagrange_7.ps,width=2in}\end{center}\end{figure}




next up previous
Next: About this document ...
Peter Kostelec
2000-05-30