Math 127(3) - Warren D. Smith - Homework #5 - due Tues 4 Mar 2003 -------------ANSWERS--------------------------------------------- Finish reading ch 15. You should understand gradients, directional derivatives, and how to find them; how to optimize a function, how to distinguish maxima, minima, and saddle points (for smooth functions in generic situations) for functions of 2 variables by using 2nd partial derivative info, and how to solve CONSTRAINED optimization problems using LAGRANGE MULTIPLIER technique. Then can start reading ch 16. Do these exercises in section 15.10 (page 1028 my book) #4, #16. In section 15.8 (page 1013 my book) #6, #9, #18. In section 15.2 (Page 962 my book) #18. [see defn 15.2.2 in book if forget what a directional derivative is...] ------------------------------------ 15.10.4: 2 3 Is (x + y, y + x) the gradient of some function F(x,y)? If so, 2 3 dF/dx = x + y so F(x,y) = x /3 + yx + C(y) where C(y) is a "constant of integration" (as far as x is concerned) but really is not a constant since it could depend on y. Now 3 dF/dy = x + C'(y) = y + x, 3 4 so it works if and only if C'(y) = y, so C(y) = y /4 + C. Conclusion: yes, this is the gradient of 3 4 F(x,y) = x /3 + yx + y /4 + C. 15.10.16: 2 Is (2 ln(3y) + 1/x, 2x/y + y ) the gradient of some function F(x,y)? If so, dF/dx = 2 ln(3y) + 1/x so F(x,y) = 2x ln(3y) + ln(x) + C(y). Now 2 dF/dy = 2x/y + C'(y) = 2x/y + y so it works if and only if 2 3 C'(y) = y , so C(y) = y /3 + C. Conclusion: yes, this is the gradient of 3 F(x,y) = 2x ln(3y) + ln(x) + y /3 + C. 15.8.6: 4 4 Maximize x+y on the curve x + y = 1. Lagrange's multiplier trick tells us that grad(x+y) = (1,1) 4 4 3 3 has to be PARALLEL to grad(x + y ) = 4(x , y ) at the max (or min). That means x=y at the max (or min). But we also have to satisfy 4 4 4 -1/4 x + y = 1 so 2 x = 1 so x = y = 2 = 0.8408964153 is the answer. (The min is x=y = -0.84...). x+y at the max is 3/4 2. 15.8.9: 2 2 2 Maximize xyz on the ellipsoid (x/a) + (y/b) + (z/c) = 1. Lagrange's multiplier trick tells us that grad(xyz) = (yz, xz, xy) 2 2 2 has to be PARALLEL to grad( (x/a) + (y/b) + (z/c) ) 2 2 2 = ( 2x/a , 2y/b , 2z/c ) at the max. That means for some scalar k, 2 2 2 (yz, xz, xy) k = ( x/a , y/b , z/c ). (3 eqns) This is 3 equations in 4 unknowns x,y,z,k and also there is a 4th equation (the ellipsoid equation). We see 2 2 2 k = x/(a yz) = y/(b xz) = z/(c xy). 2 using the first expression for k here and multiplying or 3 eqns by a on all sides we get 2 2 (xyz, xxz, xxy) 2 2 2 2 (x, x / y, x / z) = --------------- = ( x , a y/b , a z/c ). yz 2 2 2 2 2 2 2 2 The middle of these 3 eqns is solved for y = b x / a & z = c x / a. We now have expressed k,y,z in terms of x, the only remaining unknown. Using the ellipsoid equation 2 2 2 (x/a) + (y/b) + (z/c) = 1, and putting in the known expressions for y and z in terms of x we have 2 2 2 (x/a) + (x/a) + (x/a) = 1, so x = +-a/sqrt(3), y = +- b/sqrt(3), z = +-c/sqrt(3) (sqrt meaning SquareRootOf) and using all + signs obviously yields a global max. At the max F = abc / sqrt(27). 15.8.18: Maximize sin(x)sin(y)sin(z) if x,y,z are angles of a triangle, i.e. if x+y+z=pi and x,y,z all are positive. Lagrange's multiplier trick tells us that grad( sin(x) sin(y) sin(z) ) = ( cos(x) sin(y) sin(z) , sin(x) cos(y) sin(z), sin(x) sin(y) cos(z) ) has to be PARALLEL to grad( x+y+z ) = (1,1,1) at the max. I.e. cos(x) sin(y) sin(z) = sin(x) cos(y) sin(z) = sin(x) sin(y) cos(z) at the max. So cot(x) = cot(y) = cot(z) at the max [by dividing all 3 sides by sin(x)sin(y)sin(z)]. So, x=y=z, so the triangle is EQUILATERAL, and 3 sin(x)sin(y)sin(z)=sin(60 degrees) = sqrt(27)/8. 15.2.18: If F(x,y,z) = z ln(x/y), then gradF = ( z/x, -z/y, ln(x/y) ). At the point (x,y,z) = (1,1,2) this is gradF = ( 2, -2, 0 ). We are asked for the directional derivative at this point in the direction going toward (2,2,1). That is, the direction is (2,2,1)-(1,1,2) = (1,1,-1) i.e. this direction's UNIT SCALED VERSION is D = (1,1,-1) / SquareRootOf(3). So the directional derivative at (x,y,z) = (1,1,2) in direction D is D.gradF = ( 2, -2, 0 ).(1,1,-1) / SquareRootOf(3) = [2-2+0] / SquareRootOf(3) = 0. (Not increasing at all in that direction, because that direction D here is perpendicular to the gradient.) ---end.