LECTURE 19 - LAGRANGE MULTIPLIERS

Similar documents
4 to find the dimensions of the rectangle that have the maximum area. 2y A =?? f(x, y) = (2x)(2y) = 4xy

Math 259 Winter Recitation Handout 9: Lagrange Multipliers

Lecture 15. Global extrema and Lagrange multipliers. Dan Nichols MATH 233, Spring 2018 University of Massachusetts

ANSWER KEY. (a) For each of the following partials derivatives, use the contour plot to decide whether they are positive, negative, or zero.

Exam 2 Summary. 1. The domain of a function is the set of all possible inputes of the function and the range is the set of all outputs.

Lecture 19 - Partial Derivatives and Extrema of Functions of Two Variables

Section 14.3 Partial Derivatives

FUNCTIONS OF SEVERAL VARIABLES AND PARTIAL DIFFERENTIATION

Review guide for midterm 2 in Math 233 March 30, 2009

i + u 2 j be the unit vector that has its initial point at (a, b) and points in the desired direction. It determines a line in the xy-plane:

SOLUTIONS 2. PRACTICE EXAM 2. HOURLY. Problem 1) TF questions (20 points) Circle the correct letter. No justifications are needed.

SYDE 112, LECTURE 34 & 35: Optimization on Restricted Domains and Lagrange Multipliers

Definitions and claims functions of several variables

Solutions to the problems from Written assignment 2 Math 222 Winter 2015

CHAPTER 11 PARTIAL DERIVATIVES

Goals: To study constrained optimization; that is, the maximizing or minimizing of a function subject to a constraint (or side condition).

MATH 105: Midterm #1 Practice Problems

Section 15.3 Partial Derivatives

Maxima and Minima. Terminology note: Do not confuse the maximum f(a, b) (a number) with the point (a, b) where the maximum occurs.

WESI 205 Workbook. 1 Review. 2 Graphing in 3D

Exam 2 Review Sheet. r(t) = x(t), y(t), z(t)

Discussion 8 Solution Thursday, February 10th. Consider the function f(x, y) := y 2 x 2.

Unit 7 Partial Derivatives and Optimization

MATH Exam 2 Solutions November 16, 2015

Name: ID: Section: Math 233 Exam 2. Page 1. This exam has 17 questions:

Similarly, the point marked in red below is a local minimum for the function, since there are no points nearby that are lower than it:

MATH 8 FALL 2010 CLASS 27, 11/19/ Directional derivatives Recall that the definitions of partial derivatives of f(x, y) involved limits

Lecture 4 : Monday April 6th

Practice problems from old exams for math 233


11.7 Maximum and Minimum Values

14.4. Tangent Planes. Tangent Planes. Tangent Planes. Tangent Planes. Partial Derivatives. Tangent Planes and Linear Approximations

Test Yourself. 11. The angle in degrees between u and w. 12. A vector parallel to v, but of length 2.

Calculus 3 Exam 2 31 October 2017

MATH 259 FINAL EXAM. Friday, May 8, Alexandra Oleksii Reshma Stephen William Klimova Mostovyi Ramadurai Russel Boney A C D G H B F E

2.1 Partial Derivatives

Calculus II Fall 2014

Practice problems from old exams for math 233

MATH Review Exam II 03/06/11

MATH 261 EXAM II PRACTICE PROBLEMS

Math 148 Exam III Practice Problems

Maxima and Minima. Chapter Local and Global extrema. 5.2 Continuous functions on closed and bounded sets Definition of global extrema

MATH 20C: FUNDAMENTALS OF CALCULUS II FINAL EXAM

Math 32, October 22 & 27: Maxima & Minima

MULTI-VARIABLE OPTIMIZATION NOTES. 1. Identifying Critical Points

MATH 12 CLASS 9 NOTES, OCT Contents 1. Tangent planes 1 2. Definition of differentiability 3 3. Differentials 4

DIFFERENTIAL EQUATIONS. A principal model of physical phenomena.

Final Exam Review Problems. P 1. Find the critical points of f(x, y) = x 2 y + 2y 2 8xy + 11 and classify them.

18.3. Stationary Points. Introduction. Prerequisites. Learning Outcomes

University of California, Berkeley Department of Mathematics 5 th November, 2012, 12:10-12:55 pm MATH 53 - Test #2

Calculus I Handout: Curves and Surfaces in R 3. 1 Curves in R Curves in R 2 1 of 21

Functions of several variables

Lecture 19. Vector fields. Dan Nichols MATH 233, Spring 2018 University of Massachusetts. April 10, 2018.

DIFFERENTIAL EQUATIONS. A principal model of physical phenomena.

11.2 LIMITS AND CONTINUITY

1. Vector Fields. f 1 (x, y, z)i + f 2 (x, y, z)j + f 3 (x, y, z)k.

Math 5BI: Problem Set 1 Linearizing functions of several variables

Review Sheet for Math 230, Midterm exam 2. Fall 2006

Math 2321 Review for Test 2 Fall 11

266&deployment= &UserPass=b3733cde68af274d036da170749a68f6

[f(t)] 2 + [g(t)] 2 + [h(t)] 2 dt. [f(u)] 2 + [g(u)] 2 + [h(u)] 2 du. The Fundamental Theorem of Calculus implies that s(t) is differentiable and

REVIEW SHEET FOR MIDTERM 2: ADVANCED

Math for Economics 1 New York University FINAL EXAM, Fall 2013 VERSION A

Math 2411 Calc III Practice Exam 2

MATH 234 THIRD SEMESTER CALCULUS

Review Problems. Calculus IIIA: page 1 of??

Mock final exam Math fall 2007

MATH 253 Page 1 of 7 Student-No.: Midterm 2 November 16, 2016 Duration: 50 minutes This test has 4 questions on 7 pages, for a total of 40 points.

The Chain Rule, Higher Partial Derivatives & Opti- mization

7/26/2018 SECOND HOURLY PRACTICE I Maths 21a, O.Knill, Summer Name:

Examples: Find the domain and range of the function f(x, y) = 1 x y 2.

14.7 Maximum and Minimum Values

Chapter 16. Partial Derivatives

I II III IV V VI VII VIII IX X Total

Math Lecture 2 Inverse Functions & Logarithms

Partial Differentiation 1 Introduction

We like to depict a vector field by drawing the outputs as vectors with their tails at the input (see below).

Sect 4.5 Inequalities Involving Quadratic Function

Differentiable functions (Sec. 14.4)

ES 111 Mathematical Methods in the Earth Sciences Lecture Outline 6 - Tues 17th Oct 2017 Functions of Several Variables and Partial Derivatives

14.6 Directional Derivatives

Exam 1 Study Guide. Math 223 Section 12 Fall Student s Name

47. Conservative Vector Fields

1. Let f(x, y) = 4x 2 4xy + 4y 2, and suppose x = cos t and y = sin t. Find df dt using the chain rule.

11/18/2008 SECOND HOURLY FIRST PRACTICE Math 21a, Fall Name:

11/1/2017 Second Hourly Practice 2 Math 21a, Fall Name:

Calculus of Several Variables

The 21 st Century Wireless Classroom Network for AP Calculus

State Math Contest Junior Exam SOLUTIONS

Conceptual Explanations: Analytic Geometry or Conic Sections

Permutation Groups. Every permutation can be written as a product of disjoint cycles. This factorization is unique up to the order of the factors.

MAT B41 SUMMER 2018 MOCK TERM TEST - VERSION A

B) 0 C) 1 D) No limit. x2 + y2 4) A) 2 B) 0 C) 1 D) No limit. A) 1 B) 2 C) 0 D) No limit. 8xy 6) A) 1 B) 0 C) π D) -1

Independence of Path and Conservative Vector Fields

Problem types in Calculus

Double Integrals over More General Regions

Conic and Quadric Surface Lab page 4. NORTHEASTERN UNIVERSITY Department of Mathematics Fall 03 Conic Sections and Quadratic Surface Lab

Chapter 3, Part 1: Intro to the Trigonometric Functions

Honors Algebra 2 Assignment Sheet - Chapter 1

Math 232. Calculus III Limits and Continuity. Updated: January 13, 2016 Calculus III Section 14.2

Transcription:

LECTURE 9 - LAGRANGE MULTIPLIERS CHRIS JOHNSON Abstract. In this lecture we ll describe a way of solving certain optimization problems subject to constraints. This method, known as Lagrange multipliers, gives us a way to algebraically solve such optimization problems and, unlike the previously described simplex algorithm, doesn t require that our function or constraints be linear.. Geometric Motivation Suppose that we want to solve the following problem: minimize xy subject to x y 3 + y = 2 That is, we want to find the (x, y) that makes xy as small as possible, but we only are conscerned with the points that satisfy x y 3 + y = 2. To get an idea for how to do this, suppose that we first graph the points satisfying x y 3 + y = 2. See Figure. Date: March 3, 203. 0.5 0.5.5 2 2.5 3-0.5 - -.5-2 Figure. The constraint x y 3 + y = 2.

2 CHRIS JOHNSON Our goal is to find the point on this curve, x y 3 + y = 2, which makes xy as small as possible. To do this we ll consider curves of the form xy = c, where c is some constant, and try to make this value c (which is what we re trying to minimize) as small as possible and still intersect the curve x y 3 + y = 2. Let s begin by setting c = ; so we plot the curve xy =. This gives us the red curve in Figure 2. 0.5-0.5 - -.5-2 0.5.5 2 2.5 3 Figure 2. The constraint curve together with the curve xy =. Notice that the red curve touches the blue curve in exactly two spots. The coordinates of these intersection points tell us which (x, y) we can plug in for xy to get the value and still satisfy the constraint x y 3 + y = 2. Since we want to make c as small as possible and still intersect the blue curve, let s repeat the above process with the value c =.2. So we plot xy =.2. To compare with the previous plot, for c =, both curves are shown together in Figure 3. Continuing this process, let s plot the curve xy = c for lots of values of c, and then try to find which of these c s is as small as possible with the curve xy = c still intersecting our constraint curve x y 3 + y = 2. This is shown in Figure 4. From the picture it appears that c = 2 is the smallest we can make xy = c and still intersect the curve x y 3 + y = 2. To find the (x, y)- coordinates of the point where this happens we d want to solve the system xy = 2 and x y 3 + y = 2. Let s make a few simple observations about the pictures we ve constructed above. The minimal value occured when the curves xy = c and x y 3 + y = 2 were tangent. This isn t a coincidence: if our value

LECTURE 9 - LAGRANGE MULTIPLIERS 3 0.5 0.5.5 2 2.5 3-0.5 - -.5-2 Figure 3. The constraint curve together with the curves xy = and xy =.2. 0.5 0.5.5 2 2.5 3-0.5 - -.5-2 -.2 -.0-2.2 -.4 -.6 -.8-2.0 Figure 4. The curves xy = c plotted for several values of c of c was almost optimal, then we d have two very close points of intersection. Pushing c a little bit closer to the optimal value makes the points move closer together, and when we get to the optimal value the two points collide and we have a point of tangency. Notice that this is not the same as saying there is exactly one point where the optimal value occurs, nor does it guarantee that a point of tangency is a global max/min.

4 CHRIS JOHNSON Even though we were solving a minimization problem above, we could try to solve the corresponding maximization problem in the exact same way: keep increasing c until we find the largest c so that the curves x y 3 + y = 2 and xy = c are tangent. 2. Gradients In order to solve these problems in a precise way, we need to make use of the gradient of a multivariable function. Given a differentiable function f(x, y), the gradient of f(x, y) is the (multivariable) vectorvalued function whose components are the partial derivatives of f(x, y). This function is denoted f(x, y) and is sometimes pronounced del of f(x, y) : f(x, y) = f x (x, y), f y (x, y). Example. Calculate the gradient of f(x, y) = 3xy 2 sin(x) + y x. ( f(x, y) = 3xy 2 sin(x) + y x), ( 3xy 2 sin(x) + y x) x y = 3y 2 cos(x) y x ln(y), 6xy xy x. We ll see the gradient several times through the semester, particularly in the next lecture when we talk about directional derivatives. Right now we care about the gradient because of the following theorem: Theorem. If f(x, y) is differentiable, then any vector tangent to the curve f(x, y) = c at (x 0, y 0 ) is orthogonal to f(x 0, y 0 ). Proof. By implicit differentiation, the slope dy of a curve f(x, y) = c is dx f x(x 0,y 0 ). One vector which obviously has this slope is f f y(x 0,y 0 ) y(x 0, y 0 ), f x (x 0, y 0 ). Any other tangent vector is thus a scalar multiple of this one. To check orthogonality we just take the dot prodct. f y (x 0, y 0 ), f x (x 0, y 0 ) f(x 0, y 0 ) = f y (x 0, y 0 ), f x (x 0, y 0 ) f x (x 0, y 0 ), f y (x 0, y 0 ) =f y (x 0, y 0 ) f x (x 0, y 0 ) f x (x 0, y 0 ) f y (x 0, y 0 ) =0 3. Lagrange Multipliers Now we need some way of taking the intuitive ideas above and putting them in a more formal framework. So let s suppose we have a more general optimization problem:

LECTURE 9 - LAGRANGE MULTIPLIERS 5 maximize f(x, y) subject to g(x, y) = k So of all the (x, y) pairs that satisfy g(x, y) = k, we want to pick the pair that makes f(x, y) as big as possible. In the motivating example above we considered curves f(x, y) = c and tried to make c as large as possible while still intersecting g(x, y) = k. When this happened, the curves g(x, y) = k and f(x, y) = c were tangent. So in general what we want to do is find the (x, y) so that the tangent vectors of g(x, y) = k and f(x, y) = c are parallel. Thus if f(x, y) and g(x, y) are both differentiable, then at any point where the curves f(x, y) = c and g(x, y) = k are tangent, the gradient vectors f(x, y) and g(x, y) have to be parallel. By the above theorem, to find these points of tangency, and hence to find the maximum (or minimum) of f(x, y) subject to g(x, y) = k, we need to find the (x, y) pairs that simultaneously solve f(x, y) = λ g(x, y) (because these vectors are parallel; they are scalar multiples) and g(x, y) = k (because the points have to satisfy our constraint). This turns an optimzation problem into a problem of algebra: solving a system of equations. This is known as the method of Lagrange multipliers. (The Lagrange multiplier is the value λ above.) maximize f(x, y) subject to g(x, y) = k Solve the system: f(x, y) = λ g(x, y) g(x, y) = k Notice that f(x, y) = λ g(x, y), when written out in components, really is just an algebraic system of equations. maximize f(x, y) subject to g(x, y) = k Solve the system: f x (x, y) = λg x (x, y) f y (x, y) = λg y (x, y) g(x, y) = k Example 2. Use the method of Lagrange multipliers to solve the following optimization problem: maximize 5x 3y subject to x 2 + y 2 = 36 Here f(x, y) = 5x 3y, g(x, y) = x 2 + y 2, and k = 36. First we find our gradients: f(x, y) = 5, 3 g(x, y) = 2x, 2y

6 CHRIS JOHNSON And so we want to solve the following system of equations: 5 =λ2x 3 =λ2y x 2 + y 2 =36 Solving the first two equations for x and y, we have x = 5 2λ y = 3 2λ. Notice that there s no possible way for λ to equal zero in our problem because of the equation 5 = λ2x; if we did have λ = 0, this equation would give us 5 = 0, which is certainly not true. Plugging these into the constraint x 2 + y 2 = 36, we have 25 4λ + 9 2 4λ = 36 2 = 34 4λ = 36 2 = λ 2 = 34 544 = 6 Thus λ = ± /4. If λ = /4, the first two equations become 5 = x and 3 = y, or 2 2 x = 0 and y = 6. If λ = /4, then we d have x = 0 and y = 6. So there are two solutions to our system of equations: (0, 6) and ( 0, 6). One of these is the maximum, and one is the minimum. To see which is which we have to plug them into our original function. Plugging in (0, 6) gives 50 + 8 = 68; plugging in ( 0, 6) gives 50 8 = 68. Thus (0, 6) is the max, and ( 0, 6) is the min. (The symmetry in the solutions here is not typical of these sorts of problems, but arises from the geometry of our optimization problem. Our constraint is a circle centered at the origin, while the objective function we re trying to optimize is linear. This means the coordinates of the max and min will be opposite points on the circle.) As usual, there s nothing really special about the fact that we re using functions two variables above. We could just as easily use Lagrange multipliers to solve optimization problems with several variables. maximize f(x, x 2,..., x n ) subject to g(x, x 2,..., x n ) = k Solve the system: f(x, x 2,..., x n ) = λ g(x, x 2,..., x n ) g(x, x 2,..., x n ) = k

LECTURE 9 - LAGRANGE MULTIPLIERS 7 Example 3. Find the dimensions of the largest box that can be made with 64 square feet of cardboard. Suppose the dimensions of our box are x, y, and z. Then we want to maximize V (x, y, z) = xyz subject to the constraint that g(x, y, z) = 2xy + 2yz + 2xz = 64. The gradient of our objective function is V (x, y, z) = yz, xz, xy. The gradient of our constrant function is g(x, y, z) = 2y + 2z, 2x + 2z, 2y + 2x. Thus our system of equations is yz =λ(2y + 2z) xz =λ(2x + 2z) xy =λ(2y + 2x) 2xy + 2yz + 2xz =64. To solv this equation notice that if we multiply the first equation by x, the second equation by y, and the third equation by z we have: xyz =λx(2y + 2z) xyz =λy(2x + 2z) xyz =λz(2y + 2x) Each of the right hand sides equals xyz, so the right hand sides are all equal: λx(2y + 2z) = λy(2x + 2z) = λz(2y + 2x). Now notice that for our problem λ can never be zero. If λ was zero, then V (x, y, z) = 0 at the maximum point. However, the only way V (x, y, z) = yz, xz, xy is zero is if at least two of our coordinates are zero. Since we re talking about the volume of a box, our coordinates are all strictly positive and this can t happen. Since λ we can divide out the λ s, and also divide out the 2 s to get xy + xz = xy + yz = yz + xz. For the first equation, xy + xz = xy + yz, subtracting xy from each side gives xz = yz. Now dividing by z (again, z 0 because the coordinates are all positive) gives x = y. Similarly, the second equation, xy + yz = yz + xz gives y = z. So x = y = z.

8 CHRIS JOHNSON Plugging y = x and z = x into our constraint equation gives 2x 2 + 2x 2 + 2x 2 = 64 = 6x 2 = 64 = x 2 = 64 6 = 32 3 32 = x = ± 3 Again, all of our coordinates are positive because of the physical interpretation of our problem, so x = y = z = 32 /3 are the dimensions that maximize the volume of a cube that can be made with 64 square feet of material. Example 4. Write down the system of equations, but do not solve (it s difficult!), for the following optimization problem: maximize + x 4 + y 4 4xy subject to x 2 + y 3 = 2. Here f(x, y) = 4xy x 4 y 4, g(x, y) = x 2 + y 3 and k = 2. Thus our gradient vectors are f(x, y) = 4y 4x 3, 4x 4y 3 g(x, y) = 2x, 3y 2 So the system of equations we wish to solve is 4y 4x 3 =λ2x 4x 4y 3 =λ3y 2 x 2 + y 3 =2