Multivariable Calculus, Lagrange Multipliers

Lagrange Multipliers

Let f be a scalar function in n dimensions, and let g be a surface in n dimensions. We want to maximize f, when restricted to g.

Sometimes this can be done by brute force. If g is a hyperplane, as it often is, write one of the variables, say z, as a linear combination of the others, then substitute for z in f. Now f is a function of n-1 variables. Find the extremal values of f, as described in the previous section.

In some cases there is an easier way. Let f attain a local minimum or maximum at p, when constrained to g. Of course p is a point in g. Let t be the plane tangent to g at p. If the gradiant of f at p is not normal to t, there is a direction vector v, within t, such that ∇f.v is nonzero. Move in the direction of v and you travel up hill. Since g is arbitrarily close to t near p, we can move in the direction of v, within g, and f increases. Therefore ∇f is normal to g wherever there is a local minimum or maximum. This is a necessary (though not sufficient) condition.

As mentioned earlier, g is often a hyperplane, whence g and t are synonymous. The gradiant of f must be normal to g, and that means the partials of f are a scale multiple of the normal vector to g, which is also the coefficients of g as a linear equation. These coefficients become the lagrange multipliers. Let's look at an example.

Let f = x4+8y4+27z4, and let g be the plane x+y+z = 11/12. What is the minimum of f on g? The normal vector n is taken directly from the coefficients on x y and z, namely 1,1,1. The partials must be a linear multiple of n. In this case the lagrange multipliers are all 1, and the three partials must be equal.

4x3 = 32y3 = 104z3

Divide by 4 and take cube roots.

x = 2y = 3z

Substitute in for g and get x+x/2+x/3 = 11/12. Thus x = 1/2, y = 1/4, and z = 1/6.

Unfortunately lagrange multipliers don't provide an easy test to see if p is a minimum, saddle, or maximum, but in this case we can resolve the issue. Since f is the sum of fourth powers, approaching infinity in all directions, f atttains an absolute minimum somewhere on g, and that minimum, which is a local minimum, has to occur at p.