Maximum and Minimum: The Method of Lagrange Multipliers
Theorem. The Orthogonal Gradient Theorem
Suppose that f (x, y, z) is di↵erentiable in a region whose interior contains a smooth
curve
C : r(t) = x(t)i + y(t)j + z(t)k.
If P0 is a point on C where f has a local maximum or minimum relative to its values
on C, then rf is orthogonal to C at P0 .
Proof:
• We show that rf is orthogonal to the curve’s tangent vector r0 at P0 .
• The values of f on C are given by the composition f (x(t), y(t), z(t)), whose
derivative with respect to t is
df @f dx @f dy @f dz
= + + = rf · r0 .
dt @x dt @v dt @z dt
• At any point P0 where f has a local maximum or minimum relative to its values
on the curve, df /dt = 0, so
rf · r0 = 0
Maximum and Minimum: The Method of Lagrange Multipliers
Theorem. The Orthogonal Gradient Theorem
Suppose that f (x, y, z) is di↵erentiable in a region whose interior contains a smooth
curve
C : r(t) = x(t)i + y(t)j + z(t)k.
If P0 is a point on C where f has a local maximum or minimum relative to its values
on C, then rf is orthogonal to C at P0 .
By dropping the z-terms in the above theorem, we obtain a similar result for
functions of two variables:
Corollary: At the points on a smooth curve r(t) = x(t)i + y(t)j where a di↵er-
entiable function f (x, y) takes on its local maxima and minima relative to its values
on the curve, rf · r0 = 0.
Maximum and Minimum: The Method of Lagrange Multipliers
The Method of Lagrange Multipliers
• Suppose that f (x, y, z) and g(x, y, z) are di↵erentiable and that P0 is a point
on the surface g(x, y, z) = 0 where f has a local maximum or minimum value
relative to its other values on the surface.
• We assume also that rg 6= 0 at points on the surface g(x, y, z) = 0. Then
f takes on a local maximum or minimum at P0 relative to its values on every
di↵erentiable curve through P0 on the surface g(x, y, z) = 0.
• Therefore, rf is orthogonal to the tangent vector of every such di↵erentiable
curve through P0 . So is rg, moreover (because rg is orthogonal to the level
surface g = 0).
• Therefore, at P0 , rf is some scalar multiple of rg.
Maximum and Minimum: The Method of Lagrange Multipliers
The Method of Lagrange Multipliers
Suppose that f (x, y, z) and g(x, y, z) are di↵erentiable and rg 6= 0 when g(x, y, z) =
0. To find the local maximum and minimum values of f subject to the constraint
g(x, y, z) = 0 (if these exist), find the values of x, y, z, and that simultaneously
satisfy the equations
rf = rg and g(x, y, z) = 0.
For functions of two independent variables, the condition is similar, but without the
variable z.
Maximum and Minimum: The Method of Lagrange Multipliers
We illustrate the method with the help of examples .
• Suppose that we want to find extreme values of f subject to the constraint g(x, y, z) = k.
• We assume that the extreme values of f exist and rg 6= 0 on the surface determined by the
constraint g(x, y, z) = k.
• Then the extreme values of f may be obtained in the following way.
Step 1: Compute the gradients rf and rg.
Step 2: Find all values of x, y, z and such that
rf (x, y, z) = rg(x, y, z) and g(x, y, z) = k
Here the parameter is referred to as the Lagrange multiplier.
Step 3: Find extreme values of f at all points obtained in Step 2. The largest of these values
is the maximum values of f and the smallest is the minimum value of f .
Maximum and Minimum: The Method of Lagrange Multipliers
Problem 1: Assume that among all rectangular boxes with fixed surface area of
10 square meters there is a box of largest possible volume. Find its dimensions.
This problem can be reformulated as: Find positive x, y, z that maximize the
function f (x, y, z) = xyz subject to the constraint g(x, y, z) = xy + yz + xz 5 = 0.
Solution: Using the Lagrange multiplier method, we seek and (x, y, z) such that
rf = rg yz = (y + z), xz = (x + z), xy = (y + x)
=)
g(x, y) = 0 xy + xz + yz = 5.
• Note that x 6= 0, since x = 0 implies yz = 5 and 0 = z, so that = 0 and we get the
contradictory equation yz = 0.
• Similarly, y 6= 0, z 6= 0, x + y 6= 0, and so on.
• Elimination of from the first two equations gives yz/(y + z) = xz/(x + z), which gives
x = y; similarly, y = z.
• Substituting these values into the last equation, we obtain 3x2 = 5, or x = 5/3.
p
• Thus we get the solution x = y = z = 5/3, and xyz = (5/3)3/2 .
p
• This (cubical) shape must therefore maximize the volume, assuming there is a box of maxi-
mum volume.
Maximum and Minimum: The Method of Lagrange Multipliers
Example 2: Find the maximum and minimum values of the function f (x, y) = 3x + 4y on the
circle x2 + y 2 = 1.
Solution:
Step 1:
• Model the problem as a Lagrange multiplier problem with f (x, y) = 3x + 4y, g(x, y) =
x + y 2 1.
2
• Find the values of x, y, and that satisfy the equations
rf = rg : 3i + 4j = 2x i + 2y j 3 2
2
g(x, y) = 0 : x + y 2
1 = 0. =) x = , y= (for 6= 0)
2
• The equation g(x, y) = 0 gives
✓ ◆2 ✓ ◆ 2
3 2 5 3 3 2 4
+ 1=0 =) =± =) x = =± , y= =±
2 2 2 5 5
=) f (x, y) = 3x + 4y has extreme values at (x, y) = ±(3/5, 4/5).
• By calculating the value of 3x + 4y at the points ±(3/5, 4/5), we see that its maximum and
minimum values on the circle x2 + y 2 = 1 are
✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆
3 4 25 3 4 25
3 +4 = = 5 and 3 +4 = = 5
5 5 5 5 5 5
Maximum and Minimum: The Method of Lagrange Multipliers
Example 3: Find the absolute maximum of f (x, y) = 4x2 + 10y 2 on the disc
x2 + y 2 4.
In this example the domain is a closed and bounded set and the function is con-
tinuous so the extreme value theorem guarantees the existence of extreme values.
To find the extreme values of f we need to perform two main steps.
1. The first step is to find extreme values in the domain.
2. The second step involves finding the extreme values on the boundary which is
given by x2 + y 2 = 4.
(For this step we can use the Lagrange multiplier method. We will solve this
part using the same.)
Step 1: Find critical points. That is we need to compute partial derivatives and
set them to zero. We get fx (x, y) = 8x = 0 and fy (x, y) = 20y = 0. This implies that
(0, 0) is the critical point. The value is f (0, 0) = 0
Maximum and Minimum: The Method of Lagrange Multipliers
Step 2: To find the extreme values on the boundary we use the Lagrange mul-
tiplier method. We need to maximize f (x, y) = 4x2 + 10y 2 subject to the constraint
g(x, y) = x2 + y 2 = 4
• We need to solve rf (x, y) = rg(x, y) and g(x, y) = 4
This gives us equations
8x 2 x = 0 , 2x(4 ) = 0 (1)
20y 2 y = 0 , 2y(10 ) = 0 (2).
• Equation (1) implies that x = 0 or = 4. Setting x = 0 in x2 + y 2 = 4 we get y = ±2.
• When = 4 equation (2) implies that y = 0. Which along with x2 + y 2 = 4 gives us that
x = ±2.
• Therefore, we get the following points (0, 2), (0, 2), (2, 0) and ( 2, 0).
• The values of f at these points are
f (0, 2) = 40, f (0, 2) = 40, f (2, 0) = 16 and f ( 2, 0) = 16.
• Therefore, the maximum value is given by
f (0, 2) = 40 = f (0, 2).
Maximum and Minimum: The Method of Lagrange Multipliers
Example: Find the absolute maximum and minimum of f (x, y) = 12 x2 + 12 y 2 in
the elliptical region D defined by 12 x2 + y 2 1.
Solution:
• First we note that absolute maximum exists.
• Find the all critical points of f in the interior of D
• Since @f
@x
=y and @f
@y
= x, =) (0, 0) is the only critical point of f in the
interior of D.
• We now find the maximum and minimum of f on the boundary which is the
level curve g(x, y) = 1, where g(x, y) = 12 x2 + y 2 .
x2
• The Lagrange multiplier equations are: x = x, y = 2 y, 2
+ y 2 = 1.
• If x = 0, then y = ±1 and = 12 .
p
• If y = 0, then x = ± 2 and = 1.
Maximum and Minimum: The Method of Lagrange Multipliers
Example: Find the absolute maximum and minimum of f (x, y) = 12 x2 + 12 y 2 in
the elliptical region D defined by 12 x2 + y 2 1.
Solution:
x2
• The Lagrange multiplier equations are: x = x, y = 2 y, 2
+ y 2 = 1.
• If x 6= 0 and y 6= 0, we get both = 1 and 1/2, which is impossible.
• Thus, the candidates
p for the maxima and minima of f on boundary of D are
(0, ±1), (± 2, 0).
• For f inside D, the candidate is (0, 0).
p
• The value of f at (0, ±1) is 1/2, at (± 2, 0) it is 1 , and at (0, 0) it is 0 .
• Thus, the absolute minimum of f occurs at (0, 0) and is 0 .
p
• The absolute maximum of f on D is thus 1 and occurs at the points (± 2, 0).
Maximum and Minimum: The Method of Lagrange Multipliers
Example: Find the absolute maximum and minimum of the function f (x, y, z) =
x + y + z on the set D = {(x, y, z) | x2 + y 2 + z 2 1}.
p p p
Answer: Point p (1/ 3, 1/ 3, p 1/ 3)pis the ppoint where f assumes its absolute
minimum (namely,p 3 ) and (1/ 3, 1/ 3, 1 3 ), the point where f assumes its
maximum value 3.
Maximum and Minimum: The Method of Lagrange Multipliers
This Lagrange multiplier method has further generalization to the situation when
we seek extreme values of a given function subject to two constraints.
Method of Lagrange multipliers with two constraints:
• Suppose that we want to find extreme values of f subject to the constraints g(x, y, z) = k
and h(x, y, z) = c
• Note that this means that we are interested in finding the extreme values of f (x, y, z) when
the points (x, y, z) lie the curve of intersection, say C, of the two level surfaces given by the
constraints g(x, y, z) = k and h(x, y, z) = c
• Suppose f has an extreme value at the point P lying on the curve C. Then we know that
the gradient rf (P ) is orthogonal to the curve C at P .
Maximum and Minimum: The Method of Lagrange Multipliers
This Lagrange multiplier method has further generalization to the situation when
we seek extreme values of a given function subject to two constraints.
Method of Lagrange multipliers with two constraints:
• The gradients rg and rh are orthogonal to the level surfaces g(x, y, z) = k and h(x, y, z) = c
respectives.
• Therefore, rg and rh are both orthogonal to the curve of intersection C.
• This tells us that rf (P ) lies on the plane determined by rg(P ) and rh(P ).
• Here we assume that the gradients are non-zero and not parallel.
• In this situation, we see that, there exist scalars and µ such that
rf (P ) = rg(P ) + µrh(P )
• The scalars and µ are referred to
as Lagrange multipliers.
Maximum and Minimum: The Method of Lagrange Multipliers
Method of Lagrange multipliers with two constraints:
Maximum and Minimum: The Method of Lagrange Multipliers
Method of Lagrange multipliers with two constraints:
Example: The plane x + y + z = 1 cuts the cylinder x2 + y 2 = 1 in an ellipse. Find the points
on the ellipse that lie closest to and farthest from the origin.
Maximum and Minimum: The Method of Lagrange Multipliers
Method of Lagrange multipliers with two constraints:
Example: The plane x + y + z = 1 cuts the cylinder x2 + y 2 = 1 in an ellipse. Find the points
on the ellipse that lie closest to and farthest from the origin.
Solution: We find the extreme values of
f (x, y, z) = x2 + y 2 + z 2
(the square of the distance from (x, y, z) to the origin) subject to the constraints
g1 (x, y, z) = x2 + y 2 1 = 0 (1)
g2 (x, y, z) = x + y + z 1 = 0 (2)
• Using the Lagrange multiplier method, we seek , µ and (x, y, z) such that
rf = rg1 + µrg2
2xi + 2yj + 2zk = (2xi + 2yj) + µ(i + j + k)
2xi + 2yj + 2zk = (2 x + µ)i + (2 y + µ)j + µk
=) 2x = 2 x + µ, 2y = 2 y + µ, 2z = µ. (3)
2x = 2 x + 2z ) (1 )x = z,
=)
2y = 2 y + 2z ) (1 )y = z.
Maximum and Minimum: The Method of Lagrange Multipliers
Method of Lagrange multipliers with two constraints:
Example: The plane x + y + z = 1 cuts the cylinder x2 + y 2 = 1 in an ellipse. Find the points
on the ellipse that lie closest to and farthest from the origin.
g1 (x, y, z) = x2 + y 2 1 = 0 (1)
g2 (x, y, z) = x + y + z 1 = 0 (2)
2x = 2 x + 2z ) (1 )x = z,
=)
2y = 2 y + 2z ) (1 )y = z.
Above two equations are satisfied simultaneously if either = 1 and z = 0 or 6= 1 and
x = y = z/(1 ).
• If z = 0, then solving Equations (1) and (2) simultaneously to find the corresponding points
on the ellipse gives the two points (1, 0, 0) and (0, 1, 0).
p
2
p
• If x = y, then Equations (1) and (2) give x = ± 2
, z =1⌥ 2.
• The corresponding points on the ellipse are
p p ! p p !
2 2 p 2 2 p
P1 = , ,1 2 and P2 = , ,1 + 2
2 2 2 2
• The points on the ellipse closest to the origin are (1, 0, 0) and (0, 1, 0). The point on the
ellipse farthest from the origin is P2 .
Maximum and Minimum: The Method of Lagrange Multipliers
Example: Find the extreme points of f (x, y, z) = x + y + z subject to the two
conditions x2 + y 2 = 2 and x + z = 1.
Solution
Maximum p and minimum psubject to the two conditions x2 + y 2 = 2 and x + z = 1
occur at (0, 2, 1) and (0, 2, 1), respectively.