Lecture Note
University
Massachusetts Institute of TechnologyCourse
Multivariable CalculusPages
4
Academic year
2022
Sporkz
Views
93
Recitation video: Lagrange multipliers with 3 variables Lagrange multipliers can be used to optimize a function of several variables subjectto a constraint. πΉπππ π‘βπ πππ₯πππ’π πππ ππππππ’π π£πππ’ππ ππ π‘βπ ππ’πππ‘πππ π π₯, π¦, π§ ( ) = π₯ 2 + π₯ + 2π¦ 2 + 3π§ 2 ππ π₯, π¦, π§ ( ) π£πππππ ππ π‘βπ π’πππ‘ π πβπππ π₯ 2 + π¦ 2 + π§ 2 = 1 We have a function of the variables x,y,z equals x squared plus x plus 2y squaredplus 3z squared. What we'd like you to do is find the maximum and minimum valuesthat this function takes as the point x,y,z moves around the unit sphere-x squaredplus y squared plus z squared equals 1. To optimize this function, given theconstraint that x2 + y2 + z2 = 1. Lagrange multipliers are used to find maxima and minima of functions subject toconstraints. To determine the points at which a given function is maxed out or minedout, you first look for points at which the gradient of your objective function is parallelto that of your constraint function. When you take partial derivatives of the function fx, fy and fz, the resulting equationsmust be equal to the appropriate value of lambda times gx, gy and gz. Then yousolve that system of equations with the constraint equation. The points that give yousolutions to that system are your points to check for whether or not they are themaximum or minimum. And sometimes you have some boundary to your region, soyou have to check that as well. So in this case, the sphere's surface has no boundary. So we don't have anyboundary conditions to check. So we're going to have a really straightforwardproblem to solve, where we just have to look at the partial derivatives. So let's writedown that system of equations that we have to solve. The partial derivative offunction f with respect to x is equal to 2x plus 1. We must solve the system 2x plus 1= c, and the partial derivative of our constraint with respect to x is 2x. So thisequation has to hold: 2x plus 1 = lambda x. 2π₯ + 1 = Ξ» * 2π₯ The derivative of the function f with respect to x is given by the partial derivative of y.The derivative of y with respect to x is 4y; therefore, lambda must equal 4y. Theconstraint equation can be differentiated with respect to y as 2y; therefore, lambdaequals 2y. 4π¦ = Ξ» * 2π¦ The z partial derivative of the constraint function is 2z, so 6z must equal lambdatimes 2z. 6π§ = π₯ * 2π§
Lambda times 2z. And we have the last equation x squared plus y squared plus zsquared equals 1. π₯ 2 + π¦ 2 + π§ 2 = 1 We get 4 equations with variables x, y, and z plus a new parameter, lambda. Wewant to solve these equations to find points at which they're all satisfied. Once weget those points, we have to test them to see whether they're the maximum orminimum (or neither). We can solve this system of equations by factoring the second and third equations.The second equation contains a term with y squared in it, while the third equationhas a term with y cubed. This means that either y is equal to 0, or we can divide byit. In other words, y is equal to 0 or lambda is equal to 2. π¦ = 0 ππ Ξ» = 2 Similarly, from the third equation, either z is equal to 0 or we can divide by z and weget lambda equals 3. So from the third equation, either z is equal to 0 or lambdaequals 3. π§ = 0 ππ Ξ» = 3 We have several possibilities. Either y equals 0 and z equals 0, or y equals 0,lambda equals 3, or lambda equals 2, z equals 0. The other possibility is lambdaequals 2, lambda equals 3; however, that can't happen. So, we have threepossibilities: Case A, in which y equals z, or 0; Case B, in which y is greater than zbut less than or equal to 1; and Case C, in which y equals 1. π¦ = π§ = 0 Equal to zero when y is equal to z is 0, we can solve the constraint equation for x.When y equals z equals 0, we have x squared equals 1. There are two possibilities:The point (1,0,0) and the point (-1,0,0). This gives us x equals 1 or x equals minus 1.Thus, there are two points: (1,0,0) and (-1, 0, 0). π¦ = π§ = 0 β π₯ = 1 ππ π₯ =β 1 (1,0,0), (-1,0,0) The second case is that y could equal 0, and lambda could equal 3. π¦ = 0, Ξ» = 3 In this case, let's go back to our equations again. So from lambda equals 3, we havein our first equation that 2x plus 1 equals 6x. So 1 equals 4x or x equals 1/4. π¦ = 0, Ξ» = 3βπ₯ = 14 So, this implies that x equals 1/4. And now we still need to find z. So if we go back toour constraint equation here, we have the x equal to 1/4 and y is 0. So that means1/16 plus z squared equals 1. So z has to be the square root of 15 over 4. And z isequal to plus or minus.
π¦ = 0, Ξ» = 3 β π₯ = 14 , π§ =Β± 154 As a result, we have two points to check: (1/4, 0, square root of 15 over 4), and (1/4,0, minus square root of 15 over 4). 14 , 0, 154 ( ) , 14 , 0, β 154 ( ) Finally, we have our third case. In this situation, lambda is equal to 2 and z is equalto 0. Ξ» = 2, π§ = 0 So again, returning to our equation, when lambda equals 2 in the first equation, wehave 2x plus 1 equals 4x. Therefore, 2x equals 1 or x is 1/2. This gives us x equals1/2. Ξ» = 2, π§ = 0 βπ₯ = 12 Now if you take z equals 0 and x equals 1/2, we can take that down to our constraintequation and we get y squared equals 1. So we get y is a square root of 3/4. So yequals plus or minus the square root of 3 over 2. Ξ» = 2, π§ = 0 βπ₯ = 12 , π¦ =Β± 3 2 Thus, this gives us two points: (1/2, β3/2, 0), and (1/2, ββ3/2, 0): 12 , 3 2 , 0 ( ) , 12 , β 3 2 , 0 ( ) We have three cases from which to choose. We have solved each of them and foundthe points that lead to their solutions. Now we need to check these six points forboundaries. We must consider the values of f at each of these six points and figureout where f is maximized and minimized. These six points are the only points wherethat could happen, where f could be maximized or minimized. So we just have toevaluate our objective function, f, at these six points and find the largest value andthe smallest value. Let us now seek the solution to our original equation, x squared plus x, plus 2ysquared plus 3z squared. Let's evaluate the function at those points: x squared plusx plus 2y squared plus 3z squared. At the point (1,0,0), it is equal to 2; we will writethis on the side of the graph. So we have a value of 2 here. I'll circle that. And then at(β1, 0,0) we have x squared is 1 + x is β1; y and z terms are both 0. So for this pointwe have a function value of 0; we'll circle this one as well. 2 β 1, 0, 0 ( ) 0 β(β 1, 0, 0) To get the value of the function at (1/4, 0), we will look at what we've already writtendown. To find the value of the function at (1/4, 0) when a equals 1/4 and b equals 0,
we need to use the formula f(a, b) = ab^2 + (b^2)a^2. When a=1/4 and b=0, thisbecomes f(1/4, 0)=25 over 8. 25 8 β 14 , 0, 154 ( ) , 14 , 0, β 154 ( ) We will not do the arithmetic here and now. And at these last two points, the points(1/2, root 3 over 2, 0) and (1/2, minus root 3 over 2, 0)-the function has the samevalue of both those points. That value is 9/4. The value of 25 over 8 is equal to the value of 9/4 at both points (0, 0) and (1, 0).Now, to find the maximum value of f(x) and the minimum value of f(x), we just look atthe values that we got and say which of these are biggest and which of these aresmallest. Because all values except 0 are positive, it's easy to see that 0 is theminimum. So our maximum value of f is 0 at the point (-1, 0). ππ π ππ 0 ππ‘ (β 1, 0, 0) If you compare the values of f(2) and f(25/8), 25/8 is larger than 3. Both are less than3, but 25/8 is greater than 3. For example, it can be shown that the maximum valueof f occurs at the points (1/4, 0, plus or minus square root of 15 over 4). ) ππ π ππ 25 8 ππ‘ ( 14 , 0, Β± 154 Weβve just covered the method of Lagrange multipliers. To reiterate, you start outwith an objective function and a constraint function, and then you come up with asystem of equations by writing down their partial derivatives and solving for x. One must take care to solve the system of equations that results when setting fxequal lambda gx, fy equal lambda gy, fz equal lambda gz, and g equal someconstant. This can be a challenge because solving systems of equations is oftendifficult even for experienced mathematicians. In this case, there were several observations that we could make from the secondand third equations that made it relatively straightforward to do. And that gave ussome cases. In each of those cases, we were able to completely solve for the pointsx, y, and z. We can also solve for the associated values of lambda, but lambda is not importantto us. Once we find x, y, and z, we can forget about lambda because it does notaffect f. In this case, we got six points of interest. We then looked at the value of ourobjective function at those points. The maximum value of the objective function isfound when its value is largest in any one of these six points. Now, in some problems you will check for possible maxima and minima on theboundary of the region. However, in this case there is no boundary on a sphere, sowe do not have to worry about that. That's how we apply the method of Lagrangemultipliers to this problem and how you can apply it to other problems as well.
Recitation Video: Lagrange Multipliers with 3 Variables
Please or to post comments