Lagrange Multipliers: Examples
1. Find the minimum value of the following function, subject to the constraint shown afterwords: f(x,y,z)=2*x^2+y^2+3*z^2 2*x-3*y-4*z=49
Anwser:
Doing Lagrange by hand is a long process, but with Maple it can be done with one command. But we first need to activate the Multivariable package:
| > | with(Student[MultivariateCalculus]); |
| > | LagrangeMultipliers(2*x^2+y^2+3*z^2,[2*x-3*y-4*z-49],[x,y,z]); |
Now we find the value:
| > | eval(2*x^2+y^2+3*z^2,[x=3,y=9,z=-4]); |
2. Let T(x,y,z)=20+2*x+2*y+z^2 represent the temperature at each point on the sphere x^2+y^2+z^2=11. Find the extreme temperatures on the curve formed by the intersection of the plane x+y+z=3 and the sphere.
Anwser:
Again, use the LagrangeMultipliers command. We don't need to activate the package again because we did that above.
| > | LagrangeMultipliers(20+2*x+2*y+z^2,[x+y+z-3,x^2+y^2+z^2-11],[x,y,z]); |
Then we simplify and and use the point to find the values in the function:
| > | evalf([-1/2*RootOf(3*_Z^2-6*_Z-13)+3/2, -1/2*RootOf(3*_Z^2-6*_Z-13)+3/2, RootOf(3*_Z^2-6*_Z-13)]); |
| > | eval(20+2*x+2*y+z^2,[x=3,y=-1,z=1]); |
| > | eval(20+2*x+2*y+z^2,[x=-1,y=3,z=1]); |
| > | eval(20+2*x+2*y+z^2,[x=-.154700538,y=-.154700538,z=3.309401077]); |
Which tells us that 25 is a minimum and 30.33 is a maximum.