¡@

Lagrange Multipliers

Download Maple Worksheet

Suppose we want to find the extreme values of f(x,y) = x^2+2*y^2subject to a constraint g(x,y)=x^2+y^2 = 1.

[Maple Plot]

To maximize (minimize) f(x,y)subject to g(x,y) = 1 is to find the largest (smallest) value ksuch that the level curve f(x,y) = k intersects g(x,y) = 1. It appears from the graph above that this happens when these curves just touch each other, that is, when they have a common tangent line. Otherwise, k will be increasing (decreasing) further.

[Maple Plot]

  3DView

This means that the normal lines at the point ( x[0], y[0]) where they touch are identical. So the gradient vectors are parallel; that is,

(f[x](x[0],y[0]), f[y](x[0],y[0])) = lambda*(g[x](x[0],y[0]), g[y](x[0],y[0]))for some scalar lambda

 

Now let's take a look at the level curves.

[Maple Plot]

[Maple Plot]

 

[Maple Plot]

[Maple Plot]

Now, if we want to maximize f(x,y,z) = x*y*zsubject to the constraint

g(x,y,z)=2*x*z+2*y*z+2*x*y = 24

To maximize ( minimize) f(x,y,z) subject to g(x,y,z) = 24is to find the largest (smallest) value ksuch that the level surface f(x,y,z) = kintersects g(x,y,z) = 24.

It appears from the graph below that this happens when these surfaces just touch each other, that is, when they have a common tangent plane. Otherwise k will be increasing (decreasing) further.

[Maple Plot]

  3DView

This means that the normal lines at the point ( x[0], y[0], z[0])where they touch are identical. So the gradient vectors are parallel; that is,

(f[x](x[0],y[0],z[0]), f[y](x[0],y[0],z[0]), f[z](x[0],y[0],z[0])) = lambda*(g[x](x[0],y[0],z[0]), g[y](x[0],y[0],z[0]), g[z](x[0],y[0],z[0]))

for some scalar lambda.

[Maple Plot]

Consider the problem of finding the maximum value f(x,y,z) = x+2*y+3*z on the curve Cof intersection of g(x,y,z)= x-y+z = 1 and  h(x,y,z)= x^2+y^2 = 1.

[Maple Plot]
3DView

Notice that the tangent vector of the curve Cof intersection of g(x,y,z) = 1and h(x,y,z) = 1 is perpendicular to the normal lines of both surfaces g(x,y,z) = 1and h(x,y,z) = 1. So the tangent vector of Cat the point (x[0], y[0], z[0]) is the normal vector of the plane generated by the vectors

(g[x](x[0],y[0],z[0]), g[y](x[0],y[0],z[0]), g[z](x[0],y[0],z[0]))

and  

( h[x](x[0],y[0],z[0]), h[y](x[0],y[0],z[0]), h[z](x[0],y[0],z[0]))

[Maple Plot]
3DView

To maximize f(x,y,z)subject to the curve Cof intersection of g(x,y,z) = 1and h(x,y,z) = 1 is to find the largest value k  such that the level surface f(x,y,z) = k  intersects the curve C. It appears from the graph below  that this happens when the level surface f(x,y,z) = k just touches the curve C. Otherwise kwill be increasing further.

[Maple Plot]

  3DView

This means that the normal vector to the level surface f(x,y,z) = kis perpendicular to the tangent vector of the curve Cat the point (x[0], y[0], z[0]).

[Maple Plot]

As we notice above the tangent vector of the curve Cis the normal vector of the plane generated by the vectors

( g[x](x[0],y[0],z[0]), g[y](x[0],y[0],z[0]), g[z](x[0],y[0],z[0]) )

and

( h[x](x[0],y[0],z[0]), h[y](x[0],y[0],z[0]), h[z](x[0],y[0],z[0])

So the gradient vector of f(x,y,z)at the point (x[0], y[0], z[0]) lies on the plane generated by the vectors

( g[x](x[0],y[0],z[0]), g[y](x[0],y[0],z[0]), g[z](x[0],y[0],z[0]))

and

( h[x](x[0],y[0],z[0]), h[y](x[0],y[0],z[0]), h[z](x[0],y[0],z[0]))

Thus, we have

(f[x](x[0],y[0],z[0]), f[y](x[0],y[0],z[0]), f[z](x[0],y[0],z[0])) = lambda*(g[x](x[0],y[0],z[0]), g[y](x[0],y[0],z[0]), g[z](x[0],y[0],z[0]))+mu*(h[x](x[0],y[0],z[0]), h[y](x[0],y[0],z[0]), h[z](x[0],...
(f[x](x[0],y[0],z[0]), f[y](x[0],y[0],z[0]), f[z](x[0],y[0],z[0])) = lambda*(g[x](x[0],y[0],z[0]), g[y](x[0],y[0],z[0]), g[z](x[0],y[0],z[0]))+mu*(h[x](x[0],y[0],z[0]), h[y](x[0],y[0],z[0]), h[z](x[0],...

for some scalars lambda  and mu .


Download Maple Worksheet