MATH20132 Calculus of Several Variables 2018 Solutions to Problems 8 Lagrange s Method 1 For x R 2 let fx = x 2 3xy +y 2 5x+5y i Find the critical values of fx in R 2, ii Findthecriticalvaluesoffxrestrictedtotheparametriccurvet 2,t 3 T,t R, iii Find the critical values of fx restricted to the level set x+6y = 6 use Lagrange s method Solution i The critical values of fx in R 2 are the solutions of fx = 0 The two components of the gradient vector give 2x 3y 5 = 0 and 3x+2y +5 = 0 So the critical point in R 2 is 1, 1 T ii For the critical points of fx : x = t 2,t 3 T,t R look for the critical points of f t 2,t 3 T : t R For a function of one variable the gradient vector has one component, the derivative of f t 2,t 3 T = t 4 3t 5 +t 6 5t 2 +5t 3 The derivative of this is 6t 5 15t 4 +4t 3 +15t 2 10t which factors as tt 1t+1 6t 2 15t+10 The square can be completed in the quadratic factor as 6t 5/4 2 + 5/8 which shows that it is never zero and so cannot be factored Thus there are critical points when t = 0,1 and 1, ie at points 0,0 T,1,1 T and 1, 1 T iii For the critical points of f x : x+6y = 6 we use Lagrange s method So if gx = x+6y 6, we try to solve f x = λ gx along with x+6y = 6 The co-ordinates of the gradient vectors give the system Solve for x and y : 2x 3y 5 = λ and 3x+2y +5 = 6λ x = 1 4λ and y = 1 3λ Yet we require x + 6y = 6,ie 1 4λ 61+3λ = 6, which leads to λ = 1/2 Hence the only critical point is 3,1/2 1
Note we did not need to use Lagrange s method, we could instead have substituted x = 6y+6 in f x and looked for the turning points f y x = 0 The point of the question is that a function fx, x S R n may have different critical points depending on the set S Also, if S is given parametrically as the image of gu, u R m, we look for critical points of fgu Thus Lagrange s method is only applied when S is a level set 2 i Find the minimum value of 3x 2 + 3y 2 + z 2 subject to the condition x+y +z = 1 ii Find the maximum and minimum values of xy subject to the condition x 2 +y 2 = 1 iii Find the minimum and maximum values of xy 2 subject to the condition x 2 /a 2 +y 2 /b 2 = 1 where a and b are positive constants Solution i Let fx = 3x 2 +3y 2 +z 2, and gx = x+y +z 1, x R 3 We wish to find min{fx : gx = 0} The set {x : gx = 0} is a level set and, to be a surface, the Jacobian of g has to be full rank Yet g is scalar-valued so this is equivalent to demanding that the gradient of g is non-zero Here gx = 1,1,1 T for all x and so is non-zero for all x and we can apply the method of Lagrange multipliers This gives the equation fx = λ gx for some λ along with gx = 0 Write these out as 6x, 6y, 2z = λ1, 1, 1, x+y +z = 1 The first gives y = x, z = 3x In the second this gives x = 1/5 in which case y = 1/5 and z = 3/5 That λ = 6/5 is of no interest Hence p = 1/5,1/5,3/5 T is an extremal point of fx restricted to gx = 0 Here fp = 3/25+3/25+9/25 = 3/5 The set of x : x + y + z = 1 is closed but not bounded, so we cannot immediately say that fx attains it s lower bound at p You could argue by first restricting to x, y, z 1 We now have a closed and bounded region on which fx will attain it s lower bound Looking for this point we will either find p or a point on the boundary But if any x 1, y 1 or z 1 then fx 1 > fp Thus fp is the minimum value 2
ii Let fx = xy, and gx = x 2 + y 2 1 with x R 2 Here gx = 2x,2y T which is non-zero for all x : gx = 0 So we can apply the method of Lagrange multipliers This gives the equations y, x = λ2x, 2y along with x 2 +y 2 = 1 From the first y = 2λx and x = 2λy which together gives x = 4λ 2 x The solutions of this are either x = 0 or λ = ±1/2 If x = 0 then y = 2λx = 0 but 0,0 is not a point satisfying x 2 +y 2 = 1 If λ = ±1/2 then y = 2λx = ±x In x 2 +y 2 = 1 this gives x = ±1/ 2 Thus we have four solutions ±1/ 2,±1/ 2 T Since the circle x 2 + y 2 = 1 is a closed and bounded set the continuous function f must have minimum and maximum values on it These must occur within the points we have found Checking, 1/ T f 2,1/ 2 value, 1/ T f 2,1/ 2 1/ T = f 2, 1/ 2 = 1/2 is the minimum 1/ T = f 2, 1/ 2 = 1/2 the maximum z x p 1 q 2 p 4 q 4 q 1 p 2 y q 3 p 3 What we are doing in this problem if finding the points on the blue line with the largest height, ie largest value of z, with x,y T restricted to the red circle iii Letfx = xy 2 wherex R 2, subjecttotheconditionx 2 /a 2 +y 2 /b 2 1 = 0 Here gx = 2x/a 2,2y/b 2 T which is non-zero for all x : gx = 0 So we can apply the method of Lagrange multipliers This gives the equations y 2, 2xy 2x 2y = λ a2, b 2 3 and x2 a 2 + y2 b 2 = 1
From 2xy = λy/b 2 either y = 0 or x = λ/b 2 If x = λ/b 2 then combined with y 2 = 2λx/a 2 we get y 2 = 2λ 2 /a 2 b 2 In x 2 /a 2 +y 2 /b 2 = 1 we get 1 a 2 2 λ + 1 Thus we get four points λ x, y = b 2, ± 2 λ = ab b 2 2λ 2 = 1, ie λ = b 2 a 2 ±ab2 b2 3 ± a, ± 2 b 3 3 If y = 0 then x = ±a and we get two point ±a,0 Since the ellipse x 2 /a 2 + y 2 /b 2 = 1 is closed and bounded a continuous function must have minimum and maximum values By evaluating the function at the points found above we see that the minimum is 2ab 2 /3 3, the maximum 2ab 2 /3 3 given that a is positive Note In both parts ii & iii the problem can be reduced to a problem of one variable: i Finding extrema of xy subject to x 2 +y 2 = 1 is the same as finding extrema of ±x 1 x 2 ; ii Finding extrema of xy 2 subject to x 2 /a 2 +y 2 /b 2 = 1 is the same as finding extrema of b 2 x1 x 2 /a 2 But, if asked to use Lagrange s method, use it! 3 Find points on the circle x 2 2 + y +1 2 = 4 which are a maximum and minimum distance from the origin Hint consider the square of the distance Solution Follow the hint and find the minimum and maximum of the square of the distance function from the origin to x,y T So we start by finding the critical points of x 2 +y 2 subject to x 2 2 +y +1 2 = 4 The method of Lagrange s multipliers leads to 2x = 2λx 2 and 2y = 2λy +1 Rearrange as λ 1x 2 = 2 and λ 1y +1 = 1 Multiply x 2 2 + y +1 2 = 4 by λ 1 2 and substitute in to get 2 2 + 1 2 = 4
4λ 1 2 The resulting 4λ 1 2 = 5 has two solutions λ = 1+ 5/2 and λ = 1 5/2 These lead to the points respectively 10+4 5, 5+2 T 5 and 5 5 10 4 5, 5 2 T 5, 5 5 Note this can be checked Without proof it seems reasonable that if we consider the straight line through the origin and the centre of the circle 2, 1 T, then the circle will intersect this line at the points we need this would require a proofthe point of the question is that if you need a critical pointofthedistanceyoucanfindacriticalpointofthesquare ofthedistance 4 Find the minimum distance from the point a,0 T R 2 to the parabola y 2 = x Solution As in the previous question, consider the square of the distance from a,0 T to a point x,y T on the parabola, which is x a 2 +y 0 2 So, we need to minimise fx = x a 2 +y 2 subject to the condition gx = 0, x R 2, where gx = y 2 x Here gx = 1,2y T which is never zero so we can apply the method of Lagrange multipliers This gives 2x a = λ, From 2y = 2λy either y = 0 or λ = 1 If y = 0 then x = y 2 = 0 too 2y = 2λy, y 2 = x Ifλ = 1then2x a = 1,ie x = a 1/2andy = ± x = ± a 1/2 as long as a 1/2 Checking at the points found: f0 = a 2 and, if a 1/2, f a 1/2, ± T a 1/2 = a 1/4 Take the positive root to find the distance and we have the minimum distance is { a if a < 1/2 a 1/4 if a 1/2 5
The set of x : gx = 0 is closed but not bounded so we need an ad-hoc argument not given here to prove that we have, in fact, found the minimum values 5 Find the extremal values of f x = xy +yz, x R 3 on the level set x 2 +y 2 = 1 yz x = 0 Solution For this we need that the Jacobian of the level set is of full rank The Jacobian is 2x 2y 0 1 z y On x 2 +y 2 = 1 we cannot have x and y zero simultaneously, so the top row of the Jacobian is never 0 The two rows are possibly linearly dependent if y = 0, but then yz = x implies x = 0 which we have noted is not possible Thus the Jacobian matrix is of full rank for all x in the level set and we can apply the method of Lagrange multipliers At extremal values there exist λ,µ R such that fx = λ x 2 +y 2 + µ yz x So we have the system y = λ2x µ, x+z = 2yλ+µz, y = µy, x 2 +y 2 = 1 and yz = x From y = µy either y = 0 or µ = 1 If y = 0 the last two conditions become x 2 = 1 and 0 = x of which there is no solution So y 0 and µ = 1, when the system becomes y = λ2x 1, x = 2yλ, x 2 +y 2 = 1 and yz = x From the second, 2λ = x/y, which in the first gives y = x 2 /y 1 Rearrange so y 2 +y = x 2 = 1 y 2, having used the third equation Therefore 2y 2 +y 1 = 0 This factorises as 2y 1y +1 = 0 The solution y = 1/2 gives x = ± 3/2 and z = ± 3 The solution y = 1 gives x = 0 = z So the solutions are x 1 = 0, 1, 0, x 2 = 3/2, 1/2, 3, x 3 = 3/2, 1/2, 3 6
Calculating f at these points give fx 1 = 0, fx 2 = 3 3/4, the maximum value, fx 3 = 3 3/4, the minimum value The set of x : gx = 0 is closed but not bounded so we need an ad-hoc argumentnotgivenheretoprovethatwehave, infact, foundtheextremum values 6 Find the maximum and minimum values of 4y 2z subject to the conditions 2x y z = 2 and x 2 +y 2 = 1 SolutionThelevelsetisclosedandbounded x 2 +y 2 = 1implies x, y 1 while 2x y z = 2 means z = 2x y 2 2 x + y +2 5, by the triangle inequality The function fx = 4y 2z is continuous and so must have maximum and minimum values on the level set The Jacobian matrix of the level set is 2 1 1 2x 2y 0 This is not of full-rank only if x = y = 0 which, because of x 2 +y 2 = 1 does not lie on the level set So at all points of the level set the Jacobian matrix is of full-rank and we can apply the method of Lagrange multipliers Thus there exist λ,µ R such that fx = λ g 1 x + µ g 2 x for x R 3 This gives system of equations 0 = 2λ+2µx 4 = λ+2µy 2 = λ, along with 2x y z = 2 and x 2 +y 2 = 1 Substituting λ = 2 into the first two equations gives µy = 3 and µx = 2 Then, multiplying x 2 + y 2 = 1 by µ gives µ 2 = µx 2 + µy 2 = 4 + 9 so µ = ± 13 Thus Then x = 2/ 13, and y = ±3/ 13 z = 2x y 2 = 4/ 13 3/ 13 2 = 7/ 13 2 So the two critical points of f on the surface are x 1 = 2/ 13, 3/ 13, 7/ T 13 2, x 2 = 2/ 13, 3/ 13, 7/ 13 2 T 7
All that remains are the calculations f x 1 = 26/ 13+4 = 2 13+4, f x 2 = 2 13+4 Thereforethemaximumvalueoff ons is2 13+4, theminimum 2 13+4 7 Find the minimum distance between a point on the circle in R 2 with the equation x 2 + y 2 = 1 and a point on the parabola in R 2 with the equation y 2 = 24 x Solution Let x,y T be a point on the circle so that x 2 + y 2 = 1 and let u,v T be a point on the parabola so that v 2 = 24 u Then, as in Question 2, the problem is to minimize the function fx = x u 2 + y v 2, where x = x,y,u,v T the square of the distance between x,y T and u,v T subject to the constraint x 2 +y 2 1 gx = v 2 = 0 24 u The Jacobian matrix Jgx = 2x 2y 0 0 0 0 2 2v is not full rank only if either row is zero The second row is obviously never zero, the first is if x = y = 0 but this does not satisfy x 2 +y 2 = 1 Hence we can apply the method of Lagrange multipliers This gives the equations fx = λ g 1 x+µ g 2 x, x 2 +y 2 = 1 and v 2 = 24 u The first of these is 2x u 2y v 2x u = λ 2y v 2x 2y 0 0 +µ 0 0 2 2v 1 So 2x u = 2λx, 2y v = 2λy, 2x u = 2µ and 2y v = 2µv There are many ways to solve this system, what follows is just one 8
From 2x u = 2µ and 2y v = 2µv we get vx u = y v Then from the first pair λy = y v = vx u = λvx, ie λy = λvx Thus either λ = 0 or y = vx If λ = 0 then from the first two lines in 1 we have x = u and y = v, ie x,y = u,v But this is impossible since the curves x 2 +y 2 = 1 and y 2 = 24 x do not intersect If they did x would satisfy 1 x 2 = 24 x and you can check this has no real roots Hence y = vx Multiply vx u = y v through by x and use vx = y to get yx u = xy v ie uy = vx = y Thus either y = 0 or u = 1 If y = 0 then from x 2 + y 2 = 1, x = ±1 From y = vx, v = 0 in which case, from v 2 = 24 u, we obtain u = 4 So we get the two points x 1 = 1,0,4,0 T and x 2 = 1,0,4,0 T If u = 1 then, from v 2 = 24 u,we obtain ν = ± 6 Then y = vx = ± 6x Using x 2 +y 2 = 1 we find x = ±1/ 7 Thus we get a further four points x 3 = x 4 = x 5 = x 6 = 1/ 7, 6/ 7, 1, T 6 1/ 7, 6/ 7, 1, T 6 1/ 7, 6/ 7, 1, T 6 1/ 7, 6/ 7, 1, T 6 Note that because of y = vx there is not a free choice on the sign of y, it follows from the choices for x and v, thus four points Now we are left with the calculations, fx 1 = 9,fx 2 = 25, fx 3 = fx 4 = 8 2 7 and fx 6 = fx 5 = 8+2 7 The minimum distance therefore is 8 2 7, approximately 270849 8 An ellipse in R 3 is given by the equations { 2x 2 +y 2 = 4, x+y +z = 0 9
The intersection of a cylinder with a plane UsethemethodofLagrangemultiplierstofindthepointsontheellipsewhich are closest to the y-axis ThisisaquestionfromtheJune2012examinationwhichturnedouttobe too difficult! It should be alright away from the pressure of the examination room When you come to solving a system of equations remember to focus on finding x, y and z, ie remove the Lagrange parameters λ and µ as soon as possible Solution Given points x,y,z T on the ellipse and 0,v,0 T on the y-axis, the square of their distance apart is x 2 +y v 2 +z 2 When this is minimal we must have y = v, and so it remains to minimise fx = x 2 +z 2, subject to gx = 0 where 2x 2 +y 2 4 gx = x+y +z The level set x : gx = 0 is closed and bounded The function f is continuous and so will be bounded and will attain it s bounds The Jacobian matrix of g is Jgx = 4x 2y 0 1 1 1 This is not full rank only if x = y = 0 but this does not occur in any solutionofgx = 0 HencewecanapplythemethodofLagrangemultipliers and solve fx = λ g 1 x+µ g 2 x with x R 3,λ,µ R and gx = 0 This gives the equations 2x = 4λx+µ, 0 = 2λy +µ, 2z = µ, along with gx = 0 Then µ = 2z in the first two give x = 2λx+z and λy = z Multiply the first of these by y and substitute in the second to get xy = 2zx+zy = z2x y 10
From g 2 x = 0 we have z = x+y so xy = x+y2x y = 2x 2 +xy y 2, ie y 2 = 2x 2 From g 1 x = 0, we have 4 = 2x 2 +y 2 Combined with y 2 = 2x 2 this gives 4 = 4x 2 so x = ±1 Then y = ± 2 and z follows from z = x y This leads to four critical points of f restricted to the surface: Calculating, a 1 = a 2 = a 3 = a 4 = 1, 2, 1 T 2, 1, 2, 1+ T 2, 1, 2, 1 T 2, 1, 2, 1+ T 2 fa 1 = 4+2 2, fa 2 = 4 2 2, fa 3 = 4 2 2, fa 4 = 4+2 2 So a 2 and a 3 are the points on the ellipse closest to the y-axis 11