we wish to minimize this function; to make life easier, we may minimize

Similar documents
Lagrange multipliers October 2013

Lagrange multipliers 14.8

Math 233. Lagrange Multipliers Basics

Math 233. Lagrange Multipliers Basics

d f(g(t), h(t)) = x dt + f ( y dt = 0. Notice that we can rewrite the relationship on the left hand side of the equality using the dot product: ( f

Constrained Optimization and Lagrange Multipliers

Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers

x 6 + λ 2 x 6 = for the curve y = 1 2 x3 gives f(1, 1 2 ) = λ actually has another solution besides λ = 1 2 = However, the equation λ

(c) 0 (d) (a) 27 (b) (e) x 2 3x2

REVIEW I MATH 254 Calculus IV. Exam I (Friday, April 29) will cover sections

14.5 Directional Derivatives and the Gradient Vector

MATH2111 Higher Several Variable Calculus Lagrange Multipliers

Physics 235 Chapter 6. Chapter 6 Some Methods in the Calculus of Variations

Section 4: Extreme Values & Lagrange Multipliers.

Math 209 (Fall 2007) Calculus III. Solution #5. 1. Find the minimum and maximum values of the following functions f under the given constraints:

Math 213 Exam 2. Each question is followed by a space to write your answer. Please write your answer neatly in the space provided.

Chapter 5 Partial Differentiation

Multivariate Calculus Review Problems for Examination Two

f xx (x, y) = 6 + 6x f xy (x, y) = 0 f yy (x, y) = y In general, the quantity that we re interested in is

Math 113 Calculus III Final Exam Practice Problems Spring 2003

Gradient and Directional Derivatives

Multivariate Calculus: Review Problems for Examination Two

Partial Derivatives (Online)

3.3 Optimizing Functions of Several Variables 3.4 Lagrange Multipliers

Bounded, Closed, and Compact Sets

Math 213 Calculus III Practice Exam 2 Solutions Fall 2002

Math 326 Assignment 3. Due Wednesday, October 17, 2012.

Increasing/Decreasing Behavior

Curves, Tangent Planes, and Differentials ( ) Feb. 26, 2012 (Sun) Lecture 9. Partial Derivatives: Signs on Level Curves, Tangent

1. Show that the rectangle of maximum area that has a given perimeter p is a square.

13.1. Functions of Several Variables. Introduction to Functions of Several Variables. Functions of Several Variables. Objectives. Example 1 Solution

Optimizations and Lagrange Multiplier Method

MATH 209, Lab 5. Richard M. Slevinsky

Total. Math 2130 Practice Final (Spring 2017) (1) (2) (3) (4) (5) (6) (7) (8)

What you will learn today

HOMEWORK ASSIGNMENT #4, MATH 253

Solution 2. ((3)(1) (2)(1), (4 3), (4)(2) (3)(3)) = (1, 1, 1) D u (f) = (6x + 2yz, 2y + 2xz, 2xy) (0,1,1) = = 4 14

21-256: Lagrange multipliers

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions

R f da (where da denotes the differential of area dxdy (or dydx)

1. Suppose that the equation F (x, y, z) = 0 implicitly defines each of the three variables x, y, and z as functions of the other two:

Solution of final examination

Hw 4 Due Feb 22. D(fg) x y z (

Math 210, Exam 2, Spring 2010 Problem 1 Solution

Lagrange Multipliers and Problem Formulation

Lagrangian Multipliers

Definition 3.1 The partial derivatives of a function f(x, y) defined on an open domain containing (x, y) are denoted by f

Math 253, Section 102, Fall 2006 Practice Final Solutions

6. Find the equation of the plane that passes through the point (-1,2,1) and contains the line x = y = z.

LECTURE 18 - OPTIMIZATION

MAT203 OVERVIEW OF CONTENTS AND SAMPLE PROBLEMS

MATH 19520/51 Class 10

Linear and quadratic Taylor polynomials for functions of several variables.

Applied Lagrange Duality for Constrained Optimization

Worksheet 2.7: Critical Points, Local Extrema, and the Second Derivative Test

Winter 2012 Math 255 Section 006. Problem Set 7

Worksheet 2.2: Partial Derivatives

A small review, Second Midterm, Calculus 3, Prof. Montero 3450: , Fall 2008

Increasing/Decreasing Behavior

5 Day 5: Maxima and minima for n variables.

Euler s Method for Approximating Solution Curves

Paul's Online Math Notes Calculus III (Notes) / Applications of Partial Derivatives / Lagrange Multipliers Problems][Assignment Problems]

LINEAR ALGEBRA AND VECTOR ANALYSIS MATH 22A

MATH 2400, Analytic Geometry and Calculus 3

Second Midterm Exam Math 212 Fall 2010

18.02 Final Exam. y = 0

Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives

Quiz 6 Practice Problems

MATH Lagrange multipliers in 3 variables Fall 2016

Constrained extrema of two variables functions

Math 21a Homework 22 Solutions Spring, 2014

Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives

Practice problems from old exams for math 233 William H. Meeks III December 21, 2009

14.6 Directional Derivatives and the Gradient Vector

Lagrange Multipliers

= w. w u. u ; u + w. x x. z z. y y. v + w. . Remark. The formula stated above is very important in the theory of. surface integral.

MEI Desmos Tasks for AS Pure

Mat 241 Homework Set 7 Due Professor David Schultz

27. Tangent Planes & Approximations

7/26/2018 SECOND HOURLY PRACTICE V Maths 21a, O.Knill, Summer 2018

ID: Find all the local maxima, local minima, and saddle points of the function.

1. Fill in the right hand side of the following equation by taking the derivative: (x sin x) =

. Tutorial Class V 3-10/10/2012 First Order Partial Derivatives;...

Outcomes List for Math Multivariable Calculus (9 th edition of text) Spring

In what follows, we will focus on Voronoi diagrams in Euclidean space. Later, we will generalize to other distance spaces.

302 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES. 4. Function of several variables, their domain. 6. Limit of a function of several variables

Calculus I Review Handout 1.3 Introduction to Calculus - Limits. by Kevin M. Chevalier

3. The three points (2, 4, 1), (1, 2, 2) and (5, 2, 2) determine a plane. Which of the following points is in that plane?

Geometric Queries for Ray Tracing

EXTRA-CREDIT PROBLEMS ON SURFACES, MULTIVARIABLE FUNCTIONS AND PARTIAL DERIVATIVES

Optimization problems with constraints - the method of Lagrange multipliers

Lagrangian Multipliers

NAME: Section # SSN: X X X X

Chapter 6. Curves and Surfaces. 6.1 Graphs as Surfaces

In other words, we want to find the domain points that yield the maximum or minimum values (extrema) of the function.

Let and be a differentiable function. Let Then be the level surface given by

Lagrange multipliers. Contents. Introduction. From Wikipedia, the free encyclopedia

V = 2πx(1 x) dx. x 2 dx. 3 x3 0

Math 326A Exercise 4. Due Wednesday, October 24, 2012.

Absolute extrema of two variables functions

Transcription:

Optimization and Lagrange Multipliers We studied single variable optimization problems in Calculus 1; given a function f(x), we found the extremes of f relative to some constraint. Our ability to find local extrema of a multivariate function gives us the tools to solve some relatively simple optimization problems involving multiple variables, as in the first example below. However, many optimization problems involving multiple variables will be complicated enough that we must use the special method of Lagrange Multipliers to solve them. Example Find the shortest distance from the point (1, 0, 2) to the plane x + 2y + z = 4. Since the distance between the point (1, 0, 2) and a point (x, y, z) is given by D = (x 1) 2 + y 2 + (z + 2) 2, we wish to minimize this function; to make life easier, we may minimize D 2 = (x 1) 2 + y 2 + (z + 2) 2 instead. However, we must take the constraint into account: x, y, and z must be chosen so that x + 2y + z = 4. We can simplify the problem a bit by solving the constraint for z; x + 2y + z = 4 is equivalent to z = 4 x 2y. So we really wish to minimize f(x, y) = (x 1) 2 + y 2 + (4 x 2y + 2) 2 = (x 1) 2 + y 2 + (6 x 2y) 2. Using the methods from Section 14.7, we find the partials: and f x (x, y) = 2(x 1) 2(6 x 2y) = 4x + 4y 14, f y (x, y) = 2y 4(6 x 2y) = 10y + 4x 24. To make f x (x, y) = 0, we must have y = 7 2 x. Taking this into account for f y, we have 10( 7 2 x) + 4x 24 = 0; solving for x, we see that x = 6. Then since y = 7 2 x, we must have y = 5. ( Thus the only possible local extreme for the distance function occurs at 6, 5 ). Now we must determine if this point actually gives us a local extreme. Since f xx (x, y) = 4, f yy (x, y) = 10, and f xy (x, y) = 4, we see that f xx ( 6, 5 ) ( f yy 6, 5 ) ( fxy 2 6, 5 ) = 40 16 = 24 > 0, 1

( and since f xx 6, 5 ) ( > 0, we conclude by the Second Derivative Test that 6, 5 ) gives a local minimum for the function. Using the constraint, we see that the corresponding value for z is z = 4 6 2(5 ) = 7 6. So the minimum distance from (1, 0, 2) to the plane x + 2y + z = 4 is D = ( (x 1) 2 + y 2 + (z + 2) 2 = 5 ) 2 ( ) 5 2 ( 5 + + 6 6 = = 150 6 25 6 = 5 6. ) 2 Optimization of multivariate functions is rarely as simple as the above example; in that case, we were able to solve the constraint for z, making the problem significantly easier, but that often proves difficult to do. In general, we will use the method of Lagrange Multipliers to solve multiple variable optimization problems. The method is easier to understand if we consider the geometry behind it. We have a function f whose graph is a surface in space, and a function g that we refer to as the constraint. By this, we mean that the only values on the surface of f in which we are interested are the ones that satisfy g(x, y) = k for some constant k. For example, in the graph below, let f be the sphere and g be the cylinder. 2

The intersection of the two surfaces, outlined in magenta, gives us a constraint on f: We would like to find the point (x 0, y 0 ) so that g(x 0, y 0 ) = k and f(x 0, y 0 ) yields the maximum value among all points that satisfy g(x, y) = k. Geometrically, we want to find the point (marked in black) on the intersection of the two surfaces that is at maximum height: To find the coordinates of this point, let s think about the level curves of each surface. On the D graph, the level curves of each surface are graphed at the height of the maximum intersection:

Notice that the level curves are tangent at this point; i.e. at (x 0, y 0, z 0 ), the two level curves f(x, y) = z 0 and g(x, y) = z 0 are tangent. Let s look at the projection of some of the level curves into the xy plane: Curves of the same color indicate level curves at the same height; for example, the two green curves are both at height z =.1. Notice that the only pair of curves that are tangent are the black pair, which correspond to the two level curves graphed on the surfaces above; these curves are where the maximum occurs. This will be true in general: if f has a maximum or minimum value at (x 0, y 0 ) with respect to the constraint g(x, y) = k, then the two level curves are tangent. 4

We can use this to our advantage; since the two surfaces have level curves that are tangent at extremes of their shared values, the corresponding tangent vectors for f and g are parallel; more importantly, so are their gradients. In other words, if f takes on an extreme value with regards to the constraint g, then there is a number λ so that f = λ g. Theorem 0.0.1. The Method of Lagrange Multipliers Suppose that f(x, y, z) and g(x, y, z) are differentiable and g 0 when g(x, y, z) = k. To find the local maximum and minimum values of f subject to the constraint g(x, y, z) = k (if such values exist), find the values of x, y, z, and λ that simultaneously satisfy the equations f = λ g and g(x, y, z) = k. If f and g are instead functions of two variables, the condition is the same, except that we drop the variable z. Examples: 5

Find the points on the sphere x 2 + y 2 + z 2 = 4 that are closest to and farthest from the point (, 1, 1). We want to minimize the distance from the point (, 1, 1) subject to the constraint x 2 + y 2 + z 2 4 = 0. The distance from the point (, 1, 1) to the point (x, y, z) is d = (x ) 2 + (y 1) 2 + (z + 1) 2 ; however minimizing or maximizing this function is equivalent to minimizing or maximizing d 2 = (x ) 2 + (y 1) 2 + (z + 1) 2, which is simpler to work with. So we want to minimize/maximize subject to the constraint f(x, y, z) = (x ) 2 + (y 1) 2 + (z + 1) 2 g(x, y) = x 2 + y 2 + z 2 = 4. We would like to find x, y, and z so that x 2 + y 2 + z 2 4 = 0, as well as a number λ so that f = λ g for these same choices of x and y. Let s start by calculating the gradients: f = (2x 6) i + (2y 2) j + (2z + 2) k, and g = 2x i + 2y j + 2z k. If f = λ g, then by equating components we must have 2x 6 = 2xλ, 2y 2 = 2yλ, and 2z + 2 = 2zλ. Fortunately, it is simple to solve for λ in each of the cases above; 2x 6 = 2xλ means that 2x 2xλ = 6; 2y 2 = 2yλ means that 2y 2yλ = 2; and 2z + 2 = 2zλ means that 2z 2zλ = 2. Solving for x, y, and z respectively, we have x = 1 λ, y = 1 1, and z = 1 λ 1 λ. (1) Recall that we want to find values for x, y, z, and λ so that x 2 + y 2 + z 2 4 = 0 and the equations in (1) are satisfied. In particular, we know how each of x, y, and z must relate to λ, so we can replace these variables with their counterparts in terms of λ in x 2 + y 2 + z 2 4 = 0: we see that ( ) 2 ( ) 1 2 ( ) 1 2 + + 4 = 0. 1 λ 1 λ 1 λ Solving for λ, we have i.e. 9 + 1 + 1 4(1 λ)2 (1 λ) 2 (1 λ) 2 = 0, 4 + 8λ 4λ 2 7 + 8λ 4λ2 (1 λ) 2 = (1 λ) 2 = 0. 6

In order for the equality to be true, we must have 7 + 8λ 4λ 2 = 0; we can find the roots of 7 + 8λ 4λ 2 using the quadratic equation. λ = 8 ± 64 + 2 8 = 8 ± 176 8 = 8 ± 16 8 = 8 ± 4 8 = 1 ± 2. Now we can determine the values for x, y, and z using the equations in (1); if λ = 1 + see that x = 6, y = 2, and z = 2 ; 2 we alternatively, if λ = 1 2 then x = 6, y = 2, and z = 2. It is clear that plugging the point ( 6 2,, 2 ) into the distance equation will yield a smaller output than will plugging in the point ( 6, 2 2, ). Thus the first point is the closest point to (, 1, 1) lying on the sphere, and the second is the farthest from (, 1, 1) lying on the sphere. Find the dimensions of a right circular cylinder with volume V = 42π and minimum surface area. If we center the base of the cylinder at the origin in the xy plane, we see that the radius of the cylinder is x; the cylinder s height is z. We need to find formulas for the cylinder s volume and surface area; the volume is V = πx 2 z, and the surface area is the sum of the surface areas of the top and bottom (each has area πx 2 ) and the surface are of the side, which is 2πxz. So we wish to minimize S(x, z) = 2πx 2 + 2πxz 7

subject to the constraint V (x, z) = πx 2 z = 42π. Let s find the gradients: S = (4πx + 2πz) i + 2πx k and V = 2πxz i + πx 2 k. Then we need to find values for x, z, and λ that satisfy the equations 4πx + 2πz = 2πxzλ and 2πx = πx 2 λ. Let s work with the second equation; we can rewrite it as 2πx πx 2 λ = 0, or 2x x 2 λ = 0. Since the solution x = 0 would not make sense (the radius of the cylinder would be 0), we may assume that x 0 and divide through by x; we end up with 2 xλ = 0. This equation has no solution if λ = 0, so we may assume λ 0, and rewrite it as x = 2 λ. The first equation above may now be rewritten using this equality; dividing through by 2π, 4πx + 2πz = 2πxzλ becomes 2x + z = xzλ, which may be rewritten as 4 λ + z = 2z, which means that z = 4 λ. Now these choices for x and z must satisfy the constraint πx 2 z 42π = 0; rewriting this constraint with x = 2 λ and z = 4 λ yields the expression Solving for λ, we have π 4 λ 2 4 42π = 0. λ 16 1 λ = 42 = 27 = 1. Then x = 6 and z = 12. Thus choosing the radius of the cylinder to be and its height to be 12 will yield the cylinder of minimum surface area and volume 42π. One quick note: we could have solved this problem by solving for z in the constraint, then rewriting the equation for surface area in terms of x (i.e. without using Lagrange multipliers). This would have actually been quicker, but using Lagrange multipliers in this example does illustrate some of the things we may encounter when we are forced to use this method. Lagrange Multipliers with Two Constraints If wish to maximize or minimize f(x, y, z) under two constraints, as opposed to just one, the process is nearly the same. If the constraints are given by g(x, y, z) = k and h(x, y, z) = c, and g 8

and h are both differentiable with non-parallel gradients, then the extreme values of f subject to these constraints may be found by determining the x, y, z, λ, and µ so that f = λ g + µ h, g(x, y, z) = k, and h(x, y, z) = c. The temperature at a point (x, y, z) on the surface of the sphere x 2 + y 2 + z 2 = is given by T (x, y, z) = 20 + 2x + 2y + z 2. Find the extreme temperatures on the curve formed by the intersection of the plane x + y + z = and the sphere. We need to find the extremes on the surface T (x, y, z) under the constraints The gradients are g(x, y, z) = x 2 + y 2 + z 2 = and h(x, y, z) = x + y + z =. T = 2 i + 2 j + 2z k, g = 2x i + 2y j + 2z k, and h = i + j + k. Using the formula T = λ g 1 + µ g 2, we have 2 = 2xλ + µ, 2 = 2yλ + µ, and 2z = 2zλ + µ. We need to solve this system of equations, together with the equations x + y + z = and x 2 + y 2 + z 2 =. Notice that the equations 2 = 2xλ + µ and 2 = 2yλ + µ can be rewritten as 2 2xλ = µ, and 2 2yλ = µ; we see that 2 2xλ = 2 2yλ. Thus 2yλ 2xλ = 0, i.e. 2λ(y x) = 0. This tells us that either y x = 0 (i.e. y = x) or λ = 0. Both possibilities could cause T (x, y, z) to take on extremes values, so we must check both options. (1) If λ = 0, then since 2 2xλ = µ, we must have µ = 2. Then since 2z = 2zλ + µ, we have z = 1. Using the equation x + y + z =, we see that x + y = 2, so that y = 2 x. We may now solve for x in the other constraint x 2 + y 2 + z 2 = ; it may be rewritten as x 2 + (2 x) 2 + 1 =. So x 2 + 4 4x + x 2 + 1 = 0; simplifying, we have 2x 2 4x 6 = 0. Using the quadratic equation to find the roots of this polynomial, we have x = 4 ± 16 + 48 4 = 4 ± 64 4 = 1 ± 2. So the points (, 1, 1) and ( 1,, 1) could give us extrema. (2) If, on the other hand, y = x, then we can account for this in the constraints: x + y + z = becomes z = 2x, so that x 2 + y 2 + z 2 = becomes 2x 2 + ( 2x) 2 =. Solving this equality, 9

we have 2x 2 + 9 12x + 4x 2 =, so that 6x 2 12x 2 = 0. Again using the quadratic equation, we have x = 12 ± 144 + 48 12 = 12 ± 192 12 = 1 ± 8 12 = 1 ± 2. So the points (1 + 2, 1 + 2, 1 4 ) and (1 2, 1 2, 1 + 4 ) could also give extrema. Finally, we need to plug each of these points into T (x, y, z) to determine which ones give us extremes: T (, 1, 1) = 25, T (, 1, 1) = 25, ( T 1 + 2, 1 + 2, 1 4 ) ( = 0., and T 1 2, 1 2, 1 + 4 ) = 0.. Thus T has maximum temperature at the last two points, and minimum temperature at the first two. 10