SlideShare a Scribd company logo
PARTIAL DERIVATIVES
14
PARTIAL DERIVATIVES
In Example 6 in Section 14.7, we maximized
a volume function V = xyz subject to
the constraint 2xz + 2yz + xy = 12—which
expressed the side condition that the surface
area was 12 m2.
In this section, we present Lagrange’s method
for maximizing or minimizing a general
function f(x, y, z) subject to a constraint
(or side condition) of the form g(x, y, z) = k.
PARTIAL DERIVATIVES
14.8
Lagrange Multipliers
In this section, we will learn about:
Lagrange multipliers for two and three variables,
and given one and two constraints.
PARTIAL DERIVATIVES
LAGRANGE MULTIPLIERS
It’s easier to explain the geometric basis
of Lagrange’s method for functions of two
variables.
So, we start by trying to find the extreme
values of f(x, y) subject to a constraint of
the form g(x, y) = k.
 In other words, we seek the extreme values
of f(x, y) when the point (x, y) is restricted to lie
on the level curve g(x, y) = k.
LAGRANGE MULTIPLIERS—TWO VARIABLES
The figure shows this curve together with
several level curves of f.
 These have the
equations f(x, y) = c,
where c = 7, 8, 9,
10, 11
LAGRANGE MULTIPLIERS—TWO VARIABLES
To maximize f(x, y) subject to g(x, y) = k
is to find:
 The largest value of c
such that the level
curve f(x, y) = c
intersects g(x, y) = k.
LAGRANGE MULTIPLIERS—TWO VARIABLES
It appears that this happens when these
curves just touch each other—that is, when
they have a common tangent line.
 Otherwise, the value
of c could be
increased further.
LAGRANGE MULTIPLIERS—TWO VARIABLES
This means that the normal lines at
the point (x0 , y0) where they touch are
identical.
 So the gradient vectors are parallel.
 That is,
for some scalar λ.
0 0
0 0
( , ) ( , )
f x y g x y

  
LAGRANGE MULTIPLIERS—TWO VARIABLES
This kind of argument also applies to the
problem of finding the extreme values of
f(x, y, z) subject to the constraint g(x, y, z) = k.
 Thus, the point (x, y, z) is restricted to lie on
the level surface S with equation g(x, y, z) = k.
LAGRANGE MULTIPLIERS—THREE VARIABLES
Instead of the level curves in the previous
figure, we consider the level surfaces
f(x, y, z) = c.
 We argue that, if the maximum value of f is
f(x0, y0, z0) = c, then the level surface f(x, y, z) = c
is tangent to the level surface g(x, y, z) = k.
 So, the corresponding gradient vectors are parallel.
LAGRANGE MULTIPLIERS—THREE VARIABLES
This intuitive argument can be
made precise as follows.
LAGRANGE MULTIPLIERS—THREE VARIABLES
Suppose that a function f has an extreme
value at a point P(x0, y0, z0) on the surface S.
 Then, let C be a curve with vector equation
r(t) = <x(t), y(t), z(t)> that lies on S and passes
through P.
LAGRANGE MULTIPLIERS—THREE VARIABLES
If t0 is the parameter value corresponding to
the point P, then
r(t0) = <x0, y0, z0>
The composite function
h(t) = f(x(t), y(t), z(t))
represents the values that f
takes on the curve C.
LAGRANGE MULTIPLIERS—THREE VARIABLES
f has an extreme value at (x0, y0, z0).
So, it follows that h has an extreme value at t0.
 Thus, h’(t0) = 0.
LAGRANGE MULTIPLIERS—THREE VARIABLES
However, if f is differentiable, we can use
the Chain Rule to write:
 
       
   
   
0
0 0 0 0 0 0 0 0
0 0 0 0
0 0 0 0
0 '
, , ' , , '
, , '
, , '
x y
z
h t
f x y z x t f x y z y t
f x y z z t
f x y z t

 

  r
LAGRANGE MULTIPLIERS—THREE VARIABLES
This shows that the gradient vector
is orthogonal to the tangent
vector r’(t0) to every such curve C.
 
0 0 0
, ,
f x y z

LAGRANGE MULTIPLIERS—THREE VARIABLES
However, we already know from Section 14.6
that the gradient vector of g, ,
is also orthogonal to r’(t0) for every such
curve.
 See Equation 18 from Section 6.
 This means that the gradient vectors
and must be parallel.
 
0 0 0
, ,
g x y z

 
0 0 0
, ,
f x y z

 
0 0 0
, ,
g x y z

LAGRANGE MULTIPLIERS—THREE VARIABLES
Therefore, if , there is
a number λ such that:
 The number λ in the equation is called
a Lagrange multiplier.
 The procedure based on Equation 1 is as follows.
 
0 0 0
, , 0
g x y z
 
   
0 0 0 0 0 0
, , , ,
f x y z g x y z

  
LAGRANGE MULTIPLIER Equation 1
LAGRANGE MULTIPLIERS—METHOD
To find the maximum and minimum values
of f(x, y, z) subject to the constraint
g(x, y, z) = k [assuming that these extreme
values exist and on the surface
g(x, y, z) = k], we proceed as follows.
g
  0
a. Find all values of x, y, z, and λ such that
and
b. Evaluate f at all the points (x, y, z) that
result from step a.
 The largest of these values is the maximum value of f.
 The smallest is the minimum value of f.
LAGRANGE MULTIPLIERS—METHOD
   
 
, , , ,
, ,
f x y z g x y z
g x y z k

  

In deriving Lagrange’s method, we
assumed that .
 In each of our examples, you can check that
at all points where g(x, y, z) = k.
0
g
 
0
g
 
LAGRANGE’S METHOD
If we write the vector equation
in terms of its components, then the equations
in step a become:
fx = λgx fy = λgy fz = λgz g(x, y, z) = k
 This is a system of four equations in the four unknowns
x, y, z, and λ.
 However, it is not necessary to find explicit values for λ.
LAGRANGE’S METHOD
f g

  
For functions of two variables,
the method of Lagrange multipliers is
similar to the method just described.
LAGRANGE’S METHOD
To find the extreme values of f(x, y) subject
to the constraint g(x, y) = k, we look for values
of x, y, and λ such that:
 This amounts to solving three equations
in three unknowns:
fx = λgx fy = λgy g(x, y) = k
     
, , and ,
f x y g x y g x y k

   
LAGRANGE’S METHOD
Our first illustration of Lagrange’s method
is to reconsider the problem given in
Example 6 in Section 14.7
LAGRANGE’S METHOD
A rectangular box without a lid is to be
made from 12 m2 of cardboard.
 Find the maximum volume of such a box.
LAGRANGE’S METHOD Example 1
As in Example 6 in Section 14.7, we let
x, y, and z be the length, width, and height,
respectively, of the box in meters.
 Then, we wish to maximize V = xyz
subject to the constraint
g(x, y, z) = 2xz + 2yz +xy = 12
LAGRANGE’S METHOD Example 1
Using the method of Lagrange multipliers,
we look for values of x, y, z, and λ
such that:
and ( , , ) 12
V g g x y z

   
LAGRANGE’S METHOD Example 1
This gives the equations
Vx = λgx
Vy = λgy
Vz = λgz
2xz + 2yz + xy = 12
LAGRANGE’S METHOD Example 1
The equations become:
yz = λ(2z + y)
xz = λ(2z + x)
xy = λ(2x + 2y)
2xz + 2yz + xy = 12
LAGRANGE’S METHOD E. g. 1—Eqns. 2-5
There are no general rules for solving
systems of equations.
 Sometimes, some ingenuity is required.
LAGRANGE’S METHOD Example 1
In this example, you might notice that
if we multiply Equation 2 by x, Equation 3 by y,
and Equation 4 by z, then left sides of
the equations will be identical.
LAGRANGE’S METHOD Example 1
Doing so, we have:
xyz = λ(2xz + xy)
xyz = λ(2yz + xy)
xyz = λ(2xz + 2yz)
LAGRANGE’S METHOD E. g. 1—Eqns. 6-8
We observe that λ ≠ 0 because λ = 0
would imply yz = xz = xy = 0 from Equations
2, 3, and 4.
This would contradict Equation 5.
LAGRANGE’S METHOD Example 1
Therefore, from Equations 6 and 7,
we have
2xz + xy = 2yz + xy
which gives xz = yz.
 However, z ≠ 0 (since z = 0 would give V = 0).
 Thus, x = y.
LAGRANGE’S METHOD Example 1
From Equations 7 and 8,
we have
2yz + xy = 2xz + 2yz
which gives 2xz = xy.
 Thus, since x ≠ 0, y = 2z.
LAGRANGE’S METHOD Example 1
If we now put x = y = 2z in Equation 5,
we get:
4z2 + 4z2 + 4z2 = 12
 Since x, y, and z are all positive, we therefore
have z = 1, and so x = 2 and y = 2.
 This agrees with our answer in Section 14.7
LAGRANGE’S METHOD Example 1
Another method for solving the system
of equations 2–5 is to solve each of Equations
2, 3, and 4 for λ and then to equate
the resulting expressions.
LAGRANGE’S METHOD
Find the extreme values of the function
f(x, y) = x2 + 2y2 on the circle x2 + y2 = 1.
 We are asked for the extreme values of f
subject to the constraint
g(x, y) = x2 + y2 = 1
LAGRANGE’S METHOD Example 2
Using Lagrange multipliers, we solve
the equations and g(x, y) = 1.
These can be written as:
fx = λgx
fy = λgy
g(x, y) = 1
f g

  
LAGRANGE’S METHOD Example 2
They can also be written as:
2x = 2xλ
4y = 2yλ
x2 + y2 = 1
LAGRANGE’S METHOD E. g. 2—Eqns. 9-11
From Equation 9, we have
x = 0 or λ = 1
 If x = 0, then Equation 11 gives y = ±1.
 If λ = 1, then y = 0 from Equation 10;
so, then Equation 11 gives x = ±1.
LAGRANGE’S METHOD Example 2
Therefore, f has possible extreme values
at the points
(0, 1), (0, –1), (1, 0), (–1, 0)
 Evaluating f at these four points,
we find that:
f(0, 1) = 2 f(0, –1) = 2 f(1, 0) = 1 f(–1, 0) = 1
LAGRANGE’S METHOD Example 2
Therefore, the maximum value of f
on the circle x2 + y2 = 1 is:
f(0, ±1) = 2
The minimum value is:
f(±1, 0) = 1
LAGRANGE’S METHOD Example 2
Checking with the figure, we see that
these values look reasonable.
LAGRANGE’S METHOD Example 2
LAGRANGE’S METHOD
The geometry behind the use of Lagrange
multipliers in Example 2 is shown here.
 The extreme values
of f(x, y) = x2 + 2y2
correspond to the
level curves that
touch the circle
x2 + y2 = 1
Find the extreme values of
f(x, y) = x2 + 2y2 on the disk x2 + y2 ≤ 1
 According to the procedure in Equation 9
in Section 14.7, we compare the values of f
at the critical points with values at the points
on the boundary.
LAGRANGE’S METHOD Example 3
Since fx = 2x and fy = 4y, the only critical
point is (0, 0).
 We compare the value of f at that point
with the extreme values on the boundary
from Example 2:
f(0, 0) = 0 f(±1, 0) =1 f(0, ±1) = 2
LAGRANGE’S METHOD Example 3
Therefore, the maximum value of f
on the disk x2 + y2 ≤ 1 is:
f(0, ±1) = 2
The minimum value is:
f(0, 0) = 0
LAGRANGE’S METHOD Example 3
Find the points on the sphere
x2 + y2 + z2 = 4 that are closest to
and farthest from the point (3, 1, –1).
LAGRANGE’S METHOD Example 4
The distance from a point (x, y, z) to the point
(3, 1, –1) is:
 However, the algebra is simpler if we
instead maximize and minimize the square
of the distance:
     
2 2 2
3 1 1
d x y z
     
LAGRANGE’S METHOD Example 4
     
2
2 2 2
( , , )
3 1 1
d f x y z
x y z

     
The constraint is that the point (x, y, z)
lies on the sphere, that is,
g(x, y, z) = x2 + y2 + z2
= 4
LAGRANGE’S METHOD Example 4
According to the method of Lagrange
multipliers, we solve:
, 4
f g g

   
LAGRANGE’S METHOD Example 4
LAGRANGE’S METHOD
That gives:
2(x – 3) = 2xλ
2(y – 1) = 2yλ
2(z + 1) = 2zλ
x2 + y2 + z2 = 4
E. g. 4—Eqns. 12-15
The simplest way to solve these equations
is to solve for x, y, and z in terms of λ from
Equations 12, 13, and 14, and then
substitute these values into Equation 15.
LAGRANGE’S METHOD Example 4
From Equation 12, we have:
x – 3 = xλ or x(1 – λ) = 3 or
 Note that 1 – λ ≠ 0 because λ = 1 is impossible
from Equation 12.
3
1
x



LAGRANGE’S METHOD Example 4
Similarly, Equations 13 and 14
give:
1 1
1 1
y z
 
  
 
LAGRANGE’S METHOD Example 4
So, from Equation 15, we have:
 This gives (1 – λ)2 = 11/4, 1 – λ = ± .
 Thus,
   
 
 
2
2 2
2 2 2
1
3 1
4
1 1 1
  

  
  
LAGRANGE’S METHOD Example 4
11/ 2
11
1
2
  
These values of λ then give the corresponding
points (x, y, z):
 It’s easy to see that f has a smaller value
at the first of these points.
6 2 2 6 2 2
, , and , ,
11 11 11 11 11 11
   
  
   
   
LAGRANGE’S METHOD Example 4
Thus, the closest point is:
The farthest is:
 
6/ 11,2/ 11, 2/ 11

 
6/ 11, 2/ 11,2/ 11
 
LAGRANGE’S METHOD Example 4
LAGRANGE’S METHOD
The figure shows the sphere and
the nearest point in Example 4.
 Can you see how to
find the coordinates
of P without using
calculus?
TWO CONSTRAINTS
Suppose now that we want to find
the maximum and minimum values of
a function f(x, y, z) subject to two constraints
(side conditions) of the form g(x, y, z) = k
and h(x, y, z) = c.
TWO CONSTRAINTS
Geometrically, this means:
 We are looking for the extreme values of f
when (x, y, z) is restricted to lie on the curve
of intersection C of the level surfaces
g(x, y, z) = k and
h(x, y, z) = c.
Suppose f has such an extreme value at
a point P(x0, y0, z0).
We know from the beginning of this section
that is orthogonal to C at P.
f

TWO CONSTRAINTS
However, we also know that is orthogonal
to g(x, y, z) = k and is orthogonal to
h(x, y, z) = c.
So, and are both orthogonal to C.
g

h

TWO CONSTRAINTS
g
 h

This means that the gradient vector
is in the plane determined
by and
 We assume that these gradient vectors
are not zero and not parallel.
 
0 0 0
, ,
f x y z

TWO CONSTRAINTS
 
0 0 0
, ,
g x y z
  
0 0 0
, ,
h x y z

So, there are numbers λ and μ
(called Lagrange multipliers)
such that:
 
   
0 0 0
0 0 0 0 0 0
, ,
, , , ,
f x y z
g x y z h x y z
 

   
TWO CONSTRAINTS Equation 16
In this case, Lagrange’s method is to look
for extreme values by solving five equations
in the five unknowns
x, y, z, λ, μ
TWO CONSTRAINTS
These equations are obtained by writing
Equation 16 in terms of its components and
using the constraint equations:
fx = λgx + μhx fy = λgy + μhy fz = λgz + μhz
g(x, y, z) = k h(x, y, z) = c
TWO CONSTRAINTS
Find the maximum value of the function
f(x, y, z) = x + 2y + 3z on the curve of
intersection of the plane x – y + z = 1
and the cylinder x2 + y2 = 1
TWO CONSTRAINTS Example 5
We maximize the given function subject
to the constraints
g(x, y, z) = x – y + z = 1
h(x, y, z) = x2 + y2 = 1
TWO CONSTRAINTS Example 5
The Lagrange condition is
So, we solve the equations
1 = λ + 2xμ
2 = –λ + 2yμ
3 = λ
x – y + z = 1
x2 + y2 = 1
f g h
 
    
TWO CONSTRAINTS E. g. 5—Eqns. 17-21
Putting λ = 3 (from Equation 19)
in Equation 17, we get 2xμ = –2.
Thus, x = –1/μ.
 Similarly, Equation 18 gives y = 5/(2μ).
TWO CONSTRAINTS Example 5
Substitution in Equation 21 then
gives:
 Thus,
2 2
1 25
1
4
 
 
2 29
4 , 29 / 2
 
  
TWO CONSTRAINTS Example 5
Then,
and, from Equation 20,
2/ 29
x 
1
1 7 / 29
z x y
  
 
TWO CONSTRAINTS Example 5
5/ 29
y  
The corresponding values of f are:
 Hence, the maximum value of f
on the given curve is:
2 5 7
2 3 1 3 29
29 29 29
   
     
   
   
3 29

TWO CONSTRAINTS Example 5
TWO CONSTRAINTS
The cylinder x2 + y2 = 1
intersects the plane
x – y + z = 1 in an
ellipse.
 Example 5 asks for
the maximum value of f
when (x, y, z) is restricted
to lie on the ellipse.

More Related Content

PPT
The Gregory Gauss Quadrature formula for beginners
PPTX
Gradient divergence curl
PPT
Calculusseveralvariables.ppt
PDF
3.7 Inverse Functions
PPT
Piecewise functions updated_2016
PPT
Newton-Raphson Method
PPT
Composite functions
The Gregory Gauss Quadrature formula for beginners
Gradient divergence curl
Calculusseveralvariables.ppt
3.7 Inverse Functions
Piecewise functions updated_2016
Newton-Raphson Method
Composite functions

What's hot (20)

PPSX
Differentiation using First Principle - By Mohd Noor Abdul Hamid
PPT
Fourier series
PPT
Line integral.ppt
PPTX
Math for Bus. and Eco. Chapter 2
PPTX
Functions
PPTX
Topology M.Sc. 2 semester Mathematics compactness, unit - 4
PPTX
Inverse Functions
PDF
Double integral using polar coordinates
PPT
8.2 Exploring exponential models
PDF
Jacobi and gauss-seidel
PPT
Chapter 17 - Multivariable Calculus
PPTX
Laplace transform
PPTX
Volume of revolution
PPT
Homomorphisms
PPTX
Inverse Function.pptx
PPT
Numerical integration
PPTX
uses of leflace transformation in the field of civil engineering by Engr mesb...
PPT
L19 increasing &amp; decreasing functions
PPT
Trigonometric Function
Differentiation using First Principle - By Mohd Noor Abdul Hamid
Fourier series
Line integral.ppt
Math for Bus. and Eco. Chapter 2
Functions
Topology M.Sc. 2 semester Mathematics compactness, unit - 4
Inverse Functions
Double integral using polar coordinates
8.2 Exploring exponential models
Jacobi and gauss-seidel
Chapter 17 - Multivariable Calculus
Laplace transform
Volume of revolution
Homomorphisms
Inverse Function.pptx
Numerical integration
uses of leflace transformation in the field of civil engineering by Engr mesb...
L19 increasing &amp; decreasing functions
Trigonometric Function
Ad

Similar to Chap14_Sec8 - Lagrange Multiplier.ppt (20)

PDF
Proof of Beal's conjecture
PPTX
LIMIT OF A FUNCTIONs in mathematics 2017
PPTX
LIMIT OF A FUNCTIONs in mathematics 2017
PDF
Functions of several variables.pdf
PDF
__limite functions.sect22-24
PPT
LAGRANGE_MULTIPLIER.ppt
PDF
Average value by integral method
PPTX
Partial differentiation B tech
PPT
Limits And Derivative
PPT
Limits And Derivative slayerix
PPTX
Basic Cal - Quarter 1 Week 1-2.pptx
PDF
Quadrature
PPTX
APPLICATION OF PARTIAL DIFFERENTIATION
PDF
limits and continuity
PPTX
Act_Fin_RMT
PPTX
Calculus Assignment Help
PPT
Variational Calculus as part of Classical Mechanics
PPTX
Applied Calculus Chapter 3 partial derivatives
 
Proof of Beal's conjecture
LIMIT OF A FUNCTIONs in mathematics 2017
LIMIT OF A FUNCTIONs in mathematics 2017
Functions of several variables.pdf
__limite functions.sect22-24
LAGRANGE_MULTIPLIER.ppt
Average value by integral method
Partial differentiation B tech
Limits And Derivative
Limits And Derivative slayerix
Basic Cal - Quarter 1 Week 1-2.pptx
Quadrature
APPLICATION OF PARTIAL DIFFERENTIATION
limits and continuity
Act_Fin_RMT
Calculus Assignment Help
Variational Calculus as part of Classical Mechanics
Applied Calculus Chapter 3 partial derivatives
 
Ad

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Lesson notes of climatology university.
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Basic Mud Logging Guide for educational purpose
PDF
Insiders guide to clinical Medicine.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Cell Types and Its function , kingdom of life
PPTX
master seminar digital applications in india
Anesthesia in Laparoscopic Surgery in India
Module 4: Burden of Disease Tutorial Slides S2 2025
STATICS OF THE RIGID BODIES Hibbelers.pdf
Lesson notes of climatology university.
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Complications of Minimal Access Surgery at WLH
VCE English Exam - Section C Student Revision Booklet
Basic Mud Logging Guide for educational purpose
Insiders guide to clinical Medicine.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPH.pptx obstetrics and gynecology in nursing
102 student loan defaulters named and shamed – Is someone you know on the list?
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Abdominal Access Techniques with Prof. Dr. R K Mishra
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Cell Types and Its function , kingdom of life
master seminar digital applications in india

Chap14_Sec8 - Lagrange Multiplier.ppt

  • 2. PARTIAL DERIVATIVES In Example 6 in Section 14.7, we maximized a volume function V = xyz subject to the constraint 2xz + 2yz + xy = 12—which expressed the side condition that the surface area was 12 m2.
  • 3. In this section, we present Lagrange’s method for maximizing or minimizing a general function f(x, y, z) subject to a constraint (or side condition) of the form g(x, y, z) = k. PARTIAL DERIVATIVES
  • 4. 14.8 Lagrange Multipliers In this section, we will learn about: Lagrange multipliers for two and three variables, and given one and two constraints. PARTIAL DERIVATIVES
  • 5. LAGRANGE MULTIPLIERS It’s easier to explain the geometric basis of Lagrange’s method for functions of two variables.
  • 6. So, we start by trying to find the extreme values of f(x, y) subject to a constraint of the form g(x, y) = k.  In other words, we seek the extreme values of f(x, y) when the point (x, y) is restricted to lie on the level curve g(x, y) = k. LAGRANGE MULTIPLIERS—TWO VARIABLES
  • 7. The figure shows this curve together with several level curves of f.  These have the equations f(x, y) = c, where c = 7, 8, 9, 10, 11 LAGRANGE MULTIPLIERS—TWO VARIABLES
  • 8. To maximize f(x, y) subject to g(x, y) = k is to find:  The largest value of c such that the level curve f(x, y) = c intersects g(x, y) = k. LAGRANGE MULTIPLIERS—TWO VARIABLES
  • 9. It appears that this happens when these curves just touch each other—that is, when they have a common tangent line.  Otherwise, the value of c could be increased further. LAGRANGE MULTIPLIERS—TWO VARIABLES
  • 10. This means that the normal lines at the point (x0 , y0) where they touch are identical.  So the gradient vectors are parallel.  That is, for some scalar λ. 0 0 0 0 ( , ) ( , ) f x y g x y     LAGRANGE MULTIPLIERS—TWO VARIABLES
  • 11. This kind of argument also applies to the problem of finding the extreme values of f(x, y, z) subject to the constraint g(x, y, z) = k.  Thus, the point (x, y, z) is restricted to lie on the level surface S with equation g(x, y, z) = k. LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 12. Instead of the level curves in the previous figure, we consider the level surfaces f(x, y, z) = c.  We argue that, if the maximum value of f is f(x0, y0, z0) = c, then the level surface f(x, y, z) = c is tangent to the level surface g(x, y, z) = k.  So, the corresponding gradient vectors are parallel. LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 13. This intuitive argument can be made precise as follows. LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 14. Suppose that a function f has an extreme value at a point P(x0, y0, z0) on the surface S.  Then, let C be a curve with vector equation r(t) = <x(t), y(t), z(t)> that lies on S and passes through P. LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 15. If t0 is the parameter value corresponding to the point P, then r(t0) = <x0, y0, z0> The composite function h(t) = f(x(t), y(t), z(t)) represents the values that f takes on the curve C. LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 16. f has an extreme value at (x0, y0, z0). So, it follows that h has an extreme value at t0.  Thus, h’(t0) = 0. LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 17. However, if f is differentiable, we can use the Chain Rule to write:                   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ' , , ' , , ' , , ' , , ' x y z h t f x y z x t f x y z y t f x y z z t f x y z t       r LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 18. This shows that the gradient vector is orthogonal to the tangent vector r’(t0) to every such curve C.   0 0 0 , , f x y z  LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 19. However, we already know from Section 14.6 that the gradient vector of g, , is also orthogonal to r’(t0) for every such curve.  See Equation 18 from Section 6.  This means that the gradient vectors and must be parallel.   0 0 0 , , g x y z    0 0 0 , , f x y z    0 0 0 , , g x y z  LAGRANGE MULTIPLIERS—THREE VARIABLES
  • 20. Therefore, if , there is a number λ such that:  The number λ in the equation is called a Lagrange multiplier.  The procedure based on Equation 1 is as follows.   0 0 0 , , 0 g x y z       0 0 0 0 0 0 , , , , f x y z g x y z     LAGRANGE MULTIPLIER Equation 1
  • 21. LAGRANGE MULTIPLIERS—METHOD To find the maximum and minimum values of f(x, y, z) subject to the constraint g(x, y, z) = k [assuming that these extreme values exist and on the surface g(x, y, z) = k], we proceed as follows. g   0
  • 22. a. Find all values of x, y, z, and λ such that and b. Evaluate f at all the points (x, y, z) that result from step a.  The largest of these values is the maximum value of f.  The smallest is the minimum value of f. LAGRANGE MULTIPLIERS—METHOD       , , , , , , f x y z g x y z g x y z k     
  • 23. In deriving Lagrange’s method, we assumed that .  In each of our examples, you can check that at all points where g(x, y, z) = k. 0 g   0 g   LAGRANGE’S METHOD
  • 24. If we write the vector equation in terms of its components, then the equations in step a become: fx = λgx fy = λgy fz = λgz g(x, y, z) = k  This is a system of four equations in the four unknowns x, y, z, and λ.  However, it is not necessary to find explicit values for λ. LAGRANGE’S METHOD f g    
  • 25. For functions of two variables, the method of Lagrange multipliers is similar to the method just described. LAGRANGE’S METHOD
  • 26. To find the extreme values of f(x, y) subject to the constraint g(x, y) = k, we look for values of x, y, and λ such that:  This amounts to solving three equations in three unknowns: fx = λgx fy = λgy g(x, y) = k       , , and , f x y g x y g x y k      LAGRANGE’S METHOD
  • 27. Our first illustration of Lagrange’s method is to reconsider the problem given in Example 6 in Section 14.7 LAGRANGE’S METHOD
  • 28. A rectangular box without a lid is to be made from 12 m2 of cardboard.  Find the maximum volume of such a box. LAGRANGE’S METHOD Example 1
  • 29. As in Example 6 in Section 14.7, we let x, y, and z be the length, width, and height, respectively, of the box in meters.  Then, we wish to maximize V = xyz subject to the constraint g(x, y, z) = 2xz + 2yz +xy = 12 LAGRANGE’S METHOD Example 1
  • 30. Using the method of Lagrange multipliers, we look for values of x, y, z, and λ such that: and ( , , ) 12 V g g x y z      LAGRANGE’S METHOD Example 1
  • 31. This gives the equations Vx = λgx Vy = λgy Vz = λgz 2xz + 2yz + xy = 12 LAGRANGE’S METHOD Example 1
  • 32. The equations become: yz = λ(2z + y) xz = λ(2z + x) xy = λ(2x + 2y) 2xz + 2yz + xy = 12 LAGRANGE’S METHOD E. g. 1—Eqns. 2-5
  • 33. There are no general rules for solving systems of equations.  Sometimes, some ingenuity is required. LAGRANGE’S METHOD Example 1
  • 34. In this example, you might notice that if we multiply Equation 2 by x, Equation 3 by y, and Equation 4 by z, then left sides of the equations will be identical. LAGRANGE’S METHOD Example 1
  • 35. Doing so, we have: xyz = λ(2xz + xy) xyz = λ(2yz + xy) xyz = λ(2xz + 2yz) LAGRANGE’S METHOD E. g. 1—Eqns. 6-8
  • 36. We observe that λ ≠ 0 because λ = 0 would imply yz = xz = xy = 0 from Equations 2, 3, and 4. This would contradict Equation 5. LAGRANGE’S METHOD Example 1
  • 37. Therefore, from Equations 6 and 7, we have 2xz + xy = 2yz + xy which gives xz = yz.  However, z ≠ 0 (since z = 0 would give V = 0).  Thus, x = y. LAGRANGE’S METHOD Example 1
  • 38. From Equations 7 and 8, we have 2yz + xy = 2xz + 2yz which gives 2xz = xy.  Thus, since x ≠ 0, y = 2z. LAGRANGE’S METHOD Example 1
  • 39. If we now put x = y = 2z in Equation 5, we get: 4z2 + 4z2 + 4z2 = 12  Since x, y, and z are all positive, we therefore have z = 1, and so x = 2 and y = 2.  This agrees with our answer in Section 14.7 LAGRANGE’S METHOD Example 1
  • 40. Another method for solving the system of equations 2–5 is to solve each of Equations 2, 3, and 4 for λ and then to equate the resulting expressions. LAGRANGE’S METHOD
  • 41. Find the extreme values of the function f(x, y) = x2 + 2y2 on the circle x2 + y2 = 1.  We are asked for the extreme values of f subject to the constraint g(x, y) = x2 + y2 = 1 LAGRANGE’S METHOD Example 2
  • 42. Using Lagrange multipliers, we solve the equations and g(x, y) = 1. These can be written as: fx = λgx fy = λgy g(x, y) = 1 f g     LAGRANGE’S METHOD Example 2
  • 43. They can also be written as: 2x = 2xλ 4y = 2yλ x2 + y2 = 1 LAGRANGE’S METHOD E. g. 2—Eqns. 9-11
  • 44. From Equation 9, we have x = 0 or λ = 1  If x = 0, then Equation 11 gives y = ±1.  If λ = 1, then y = 0 from Equation 10; so, then Equation 11 gives x = ±1. LAGRANGE’S METHOD Example 2
  • 45. Therefore, f has possible extreme values at the points (0, 1), (0, –1), (1, 0), (–1, 0)  Evaluating f at these four points, we find that: f(0, 1) = 2 f(0, –1) = 2 f(1, 0) = 1 f(–1, 0) = 1 LAGRANGE’S METHOD Example 2
  • 46. Therefore, the maximum value of f on the circle x2 + y2 = 1 is: f(0, ±1) = 2 The minimum value is: f(±1, 0) = 1 LAGRANGE’S METHOD Example 2
  • 47. Checking with the figure, we see that these values look reasonable. LAGRANGE’S METHOD Example 2
  • 48. LAGRANGE’S METHOD The geometry behind the use of Lagrange multipliers in Example 2 is shown here.  The extreme values of f(x, y) = x2 + 2y2 correspond to the level curves that touch the circle x2 + y2 = 1
  • 49. Find the extreme values of f(x, y) = x2 + 2y2 on the disk x2 + y2 ≤ 1  According to the procedure in Equation 9 in Section 14.7, we compare the values of f at the critical points with values at the points on the boundary. LAGRANGE’S METHOD Example 3
  • 50. Since fx = 2x and fy = 4y, the only critical point is (0, 0).  We compare the value of f at that point with the extreme values on the boundary from Example 2: f(0, 0) = 0 f(±1, 0) =1 f(0, ±1) = 2 LAGRANGE’S METHOD Example 3
  • 51. Therefore, the maximum value of f on the disk x2 + y2 ≤ 1 is: f(0, ±1) = 2 The minimum value is: f(0, 0) = 0 LAGRANGE’S METHOD Example 3
  • 52. Find the points on the sphere x2 + y2 + z2 = 4 that are closest to and farthest from the point (3, 1, –1). LAGRANGE’S METHOD Example 4
  • 53. The distance from a point (x, y, z) to the point (3, 1, –1) is:  However, the algebra is simpler if we instead maximize and minimize the square of the distance:       2 2 2 3 1 1 d x y z       LAGRANGE’S METHOD Example 4       2 2 2 2 ( , , ) 3 1 1 d f x y z x y z       
  • 54. The constraint is that the point (x, y, z) lies on the sphere, that is, g(x, y, z) = x2 + y2 + z2 = 4 LAGRANGE’S METHOD Example 4
  • 55. According to the method of Lagrange multipliers, we solve: , 4 f g g      LAGRANGE’S METHOD Example 4
  • 56. LAGRANGE’S METHOD That gives: 2(x – 3) = 2xλ 2(y – 1) = 2yλ 2(z + 1) = 2zλ x2 + y2 + z2 = 4 E. g. 4—Eqns. 12-15
  • 57. The simplest way to solve these equations is to solve for x, y, and z in terms of λ from Equations 12, 13, and 14, and then substitute these values into Equation 15. LAGRANGE’S METHOD Example 4
  • 58. From Equation 12, we have: x – 3 = xλ or x(1 – λ) = 3 or  Note that 1 – λ ≠ 0 because λ = 1 is impossible from Equation 12. 3 1 x    LAGRANGE’S METHOD Example 4
  • 59. Similarly, Equations 13 and 14 give: 1 1 1 1 y z        LAGRANGE’S METHOD Example 4
  • 60. So, from Equation 15, we have:  This gives (1 – λ)2 = 11/4, 1 – λ = ± .  Thus,         2 2 2 2 2 2 1 3 1 4 1 1 1           LAGRANGE’S METHOD Example 4 11/ 2 11 1 2   
  • 61. These values of λ then give the corresponding points (x, y, z):  It’s easy to see that f has a smaller value at the first of these points. 6 2 2 6 2 2 , , and , , 11 11 11 11 11 11                LAGRANGE’S METHOD Example 4
  • 62. Thus, the closest point is: The farthest is:   6/ 11,2/ 11, 2/ 11    6/ 11, 2/ 11,2/ 11   LAGRANGE’S METHOD Example 4
  • 63. LAGRANGE’S METHOD The figure shows the sphere and the nearest point in Example 4.  Can you see how to find the coordinates of P without using calculus?
  • 64. TWO CONSTRAINTS Suppose now that we want to find the maximum and minimum values of a function f(x, y, z) subject to two constraints (side conditions) of the form g(x, y, z) = k and h(x, y, z) = c.
  • 65. TWO CONSTRAINTS Geometrically, this means:  We are looking for the extreme values of f when (x, y, z) is restricted to lie on the curve of intersection C of the level surfaces g(x, y, z) = k and h(x, y, z) = c.
  • 66. Suppose f has such an extreme value at a point P(x0, y0, z0). We know from the beginning of this section that is orthogonal to C at P. f  TWO CONSTRAINTS
  • 67. However, we also know that is orthogonal to g(x, y, z) = k and is orthogonal to h(x, y, z) = c. So, and are both orthogonal to C. g  h  TWO CONSTRAINTS g  h 
  • 68. This means that the gradient vector is in the plane determined by and  We assume that these gradient vectors are not zero and not parallel.   0 0 0 , , f x y z  TWO CONSTRAINTS   0 0 0 , , g x y z    0 0 0 , , h x y z 
  • 69. So, there are numbers λ and μ (called Lagrange multipliers) such that:       0 0 0 0 0 0 0 0 0 , , , , , , f x y z g x y z h x y z        TWO CONSTRAINTS Equation 16
  • 70. In this case, Lagrange’s method is to look for extreme values by solving five equations in the five unknowns x, y, z, λ, μ TWO CONSTRAINTS
  • 71. These equations are obtained by writing Equation 16 in terms of its components and using the constraint equations: fx = λgx + μhx fy = λgy + μhy fz = λgz + μhz g(x, y, z) = k h(x, y, z) = c TWO CONSTRAINTS
  • 72. Find the maximum value of the function f(x, y, z) = x + 2y + 3z on the curve of intersection of the plane x – y + z = 1 and the cylinder x2 + y2 = 1 TWO CONSTRAINTS Example 5
  • 73. We maximize the given function subject to the constraints g(x, y, z) = x – y + z = 1 h(x, y, z) = x2 + y2 = 1 TWO CONSTRAINTS Example 5
  • 74. The Lagrange condition is So, we solve the equations 1 = λ + 2xμ 2 = –λ + 2yμ 3 = λ x – y + z = 1 x2 + y2 = 1 f g h        TWO CONSTRAINTS E. g. 5—Eqns. 17-21
  • 75. Putting λ = 3 (from Equation 19) in Equation 17, we get 2xμ = –2. Thus, x = –1/μ.  Similarly, Equation 18 gives y = 5/(2μ). TWO CONSTRAINTS Example 5
  • 76. Substitution in Equation 21 then gives:  Thus, 2 2 1 25 1 4     2 29 4 , 29 / 2      TWO CONSTRAINTS Example 5
  • 77. Then, and, from Equation 20, 2/ 29 x  1 1 7 / 29 z x y      TWO CONSTRAINTS Example 5 5/ 29 y  
  • 78. The corresponding values of f are:  Hence, the maximum value of f on the given curve is: 2 5 7 2 3 1 3 29 29 29 29                   3 29  TWO CONSTRAINTS Example 5
  • 79. TWO CONSTRAINTS The cylinder x2 + y2 = 1 intersects the plane x – y + z = 1 in an ellipse.  Example 5 asks for the maximum value of f when (x, y, z) is restricted to lie on the ellipse.