CHAPTER 16 SOLUTIONS TO EXERCISES IN FUNCTIONS OF MORE THAN ONE VARIABLE – PARTIAL DIFFERENTIATION Exercises on 16.1 1. In the relation between P, V, and T, how does P vary with i) T, ii) V? How does V vary with iii) T, iv) P? Solution RT From P = V = P(V, T) we see that i) As T increases, P will also increase - in a linear fashion, or in proportion. We say P increases linearly with T. ii) As V increases, P will decrease - we say P is inversely proportional to V. iii) Solving the equation for V RT V= P we see that V increases linearly with T, and iv) V is inversely proportional to P. 2. If V increases by 10% while T remains constant, by what percentage, approximately, does P change? Solution If V increases by 10% then P becomes RT RT RT P' = V + 0.1V = V(1 + 0.1) V (1 – 0.1) on using the binomial approximation 1 1 + x 1 – x for x small –1– = P – 0.1P So P' – P P – 0.1 or P decreases by approximately 10%. Exercise 16.2 Sketch the surface representing the function z = x 2 + y2 Solution The easiest way to do this is to note that all values of (x, y) that lie on the circle x2 + y 2 = c will give the same value, c, of z. One typical pair of values of x and y serves to define each circle - for example (1, 1) defines the circle z = 2 = x2 + y2 and such representative values can be used to provide a number of circles through which the total surface can be drawn. This is illustrated in the figure (UEM 486). *** Figure 16.4 from book, page 486 *** Exercise on 16.3 Find fx, fy for the following functions i) xy f(x, y) = x + y ii) f(x,y) = e3x + cos(xy) Solution xy i) Treating y as a constant in f(x, y) = x + y and differentiating with d 1 1 respect to x gives, using the product rule and dx x = – 2 x –2– f y xy = fx = x + y – x (x + y)2 and putting over a common denominator gives y2 fx = (x + y)2 You can now do exactly the same with y exchanged for x, for practice. However, also note that because of the symmetry between x and y in f(x,y) one can immediately write down the result as fy = x2 (x + y)2 by analogy with fx. ii) f(x,y) = e3x + cos(xy) is a classic case of function of a function rule, even though there are two variables, which may make it look more complicated. Keeping y constant and differentiating with respect to x gives fx = e3x + cos(xy) 3x + cos (xy)) = e3x + cos(xy)(3 – y sin (xy)) x ( Similarly fy = e3x + cos(xy) 3x + cos (xy)) = – x e3x + cos(xy) sin (xy) y ( Exercises on 16.4 1. Find all first and second order partial derivatives of the following functions, f(x,y), checking the equality of the mixed derivatives i) f(x,y) = x3y2 + 4xy4 ii) f(x,y) = exy cos(x + y) Solution All that is needed in these problems is a steady hand with the differentiation –3– i) For f(x,y) = x3y2 + 4xy4 we have fx = 3x2y2 + 4y4 fy = 2x3y + 16xy3 fxx = 3x2y2 + 4y4) = 6xy2 (remembering that y is regarded as a x ( constant still) fyy = 2x3y + 16xy3) = 2x3 + 48xy2 y ( fyx = (fy)x = (2x3y + 16xy3)x = 6x2y + 16y3 = fxy as you can check. ii) f(x,y) = exy cos(x + y) fx = yexy cos(x + y) – exy sin(x + y) = exy (ycos(x + y) – sin(x + y)) fy = xexy cos(x + y) – exy sin(x + y) = exy (xcos(x + y) – sin(x + y)) fxx = yexy (ycos(x + y) – sin(x + y)) + exy (– ysin(x + y) – cos(x + y)) = exy ((y2 – 1)cos(x + y) – 2ysin(x + y)) fyy = = xexy (xcos(x + y) – sin(x + y)) + exy (– xsin(x + y) – cos(x + y)) = exy ((x2 – 1)cos(x + y) – 2xsin(x + y)) fyx = (fy)x = (exy (xcos(x + y) – sin(x + y)))x = yexy (xcos(x + y) – sin(x + y)) + exy (cos(x + y) – xsin(x + y) – cos(x + y)) –4– = exy (xycos(x + y) – (x + y)sin(x + y)) = fxy as you can check directly. 2. Show that f(x, y) = ln(x2 + y2) satisfies the partial differential equation: 2f 2f + = 0 x2 y2 This is called the Laplace equation in two dimensional rectangular coordinates. It is very important in fluid mechanics, electromagnetism, and many other areas of science and engineering, as well as being a key equation in pure mathematics. Solution With f(x, y) = ln(x2 + y2) we have fx = 2x x + y2 2 and fxx = 2 2x2 y2 – x2 – = x2 + y2 (x2 + y2)2 (x2 + y2)2 On the other hand we find by the same process that fyy x2 – y2 = 2 (x + y2)2 Direct addition then gives fxx + fyy y2 – x2 x2 – y 2 = 2 + 2 =0 (x + y2)2 (x + y2)2 as required. –5– Exercises on 16.5 1. Find the total differential dz when ii) z = exp(x/y) i) z = ln(cos(xy)) Solution Really, these exercises amount to little more than finding the first order derivatives i) z = ln(cos(xy)) ysin(xy) zx = – cos(xy) = – ytan(xy) and zy = – xtan(xy) and so dz = zx dx + zy dy = – ytan(xy) dx – xtan(xy) dy = – tan(xy)(ydx + xdy) ii) z = exp(x/y) 1 x zx = y exp(x/y) and zy = – 2 exp(x/y) and so y x 1 dz = exp(x/y) ydx – 2dy y = 2. If z = e2x+ 3y and 1 exp(x/y) (ydx – xdy) y2 x = ln t, dz y = t2 , calculate dt from the total derivative formula and show that it agrees with the result obtained by substitution for x and y before differentiating. Solution From the total derivative we have –6– dz z dx z dy dx dy 2x+ 3y 2x+ 3y = + = 2e + 3e dt dt dt x dt y dt 1 = 2e2x+3y t + 3e2x+3y 2t 2 2 1 2 2 = 2eln t + 3t t + 6teln t + 3t 2 2 2 2 2 3 2 2 2 = t t e3t + 6t t e3t = (6t + 2t)e3t = 2t(3t + 1)e3t If we first substitute for x and y in terms of t we obtain 2 2 2 2 z = eln t + 3t = t e3t on using eln x = x. Differentiating this with respect to t now gives dz 2 3t2 2 3t2 3t2 = 2te + t e (6t) = 2t(3t + 1)e dt as previously. REINFORCEMENT EXERCISES IN FUNCTIONS OF MORE THAN ONE VARIABLE 1. Find the values of the following functions at the points given :i) f(x, y) = 2xy3 + 3x2 y at the point (2, 1) ii) g(x, y) = (x + y)ex sin y at the point (0, /2) iii) iv) x2 + y2 + z2 at the points (–1, 2, 2) and (3, 2, 4) 2 l(x, y,z) = ex y4 cos z at 0, – 2, 3 h(x, y, z) = Solution i) The value of f(x, y) = 2xy3 + 3x2 y at the point (2, 1) is f(2, 1) = 2(2)(1)3 + 3(2)2(1) = 4 + 12 = 16 –7– ii) g(0, /2) = 0 + 2 e0 sin 2 = 2(1)(1) = 2 iii) h(–1, 2, 2) = h(3, 2, 4) = iv) l 0, – 2, 3 2. (– 1)2 + 22 + 22 32 + 22 + 42 = 9 =3 = 29 1 2 = e0 (– 2)4 cos 3 = (1)(16)2 = 8 Sketch the surfaces represented by z = f(x, y) where i) z = 1 – 3y ii) x2 + y2 + z2 = 9 Solution i) Since z = 1 – 3y does not depend on x, its profile will be the same for all values of x. If we sketch it for say x= 0 then we simply get the line z = 1 – 3y in the yz plane. The total surface is then obtained by translating this line parallel to itself in the positive and negative x directions. The figure shows this on the positive side of the xz plane with z positive. *** Figure from book, 2 (i) page 496 *** ii) x2 + y2 + z2 = 9 is the equation of a sphere with centre at the origin and with radius 9 = 3, shown in the figure below. *** Figure from book, 2 (ii) page 496 *** 3. Determine z/x, z/y in each case x i) z = x2 + y2 ii) z = y 1 iv) z = v) z = exy cos(3y2) 2 2 x +y x2 + y2 vii) z = e–xy (2 + 3xy) viii) z = 1+y Solution –8– iii) z = x3 + x2y + y4 vi) z = ln(1 + xy) x ix) z = x3 tan–1y This is really nothing more than a marathon exercise in differentiation, and you need no more skills than we covered in Chapter 8 - along with an ability to keep focused on whether it is x or y you are differentiating with respect to! i) z = x2 + y2 z = 2x (y is constant) x z = 2y (x is constant) y x ii) z = y 1 zx = y zy = – x y2 iii) z = x3 + x2y + y4 zx = 3x2 + 2xy iv) z = 1 2 x +y 2 zy = x2 + 4y3 = (x2 + y2)– 1/2 so 1 x zx = –2 (x2 + y2) – 3/2 (2x) = – 2 (x + y2)3/2 and by symmetry zy = – v) y (x + y2)3/2 2 z = exy cos(3y2) zx = yexy cos(3y2) zy = xexy cos(3y2) + exy (– sin (3y2)) 6y = vi) exy (xcos(3y2) – 6ysin (3y2)) z = ln(1 + xy) –9– y x zx = 1 + xy and by symmetry zy = 1 + xy vii) z = e–xy (2 + 3xy) zx = (– y)e– xy (2 + 3xy) + e–xy (3y) = ye– xy (1 – 3xy) (same as answer in book) (– x)e– xy (2 + 3xy) + e–xy (3x) = xe– xy (1 – 3xy) zy = viii) z = zx = x2 + y2 1+y 2x 1+y zy = (remember y and therefore 2y 1 x2 + y2 – 2 = (1 + y)3/2 1+y = 1 + y is a constant) 4y(1 + y) – x2 – y2 2(1 + y)3/2 3y2 + 4y – x2 2(1 + y)3/2 x ix) z = x3 tan–1y 1 x 1 zx = 3x2 tan–1y + x3 2 y 1 + (x/y) yx3 x = 3x2 tan–1y + 2 x + y2 1 x4 x zy = x – = – 2 x + y2 1 + (x/y)2 y2 3 – 10 – 4. z (0, 0) x For each of the functions in Q3 evaluate , z (1, 2) y whenever possible. Solution i) z = x2 + y2 z z (0, 0) = 2x so x x = 2(0) = 0 z z (1, 2) = 2y so y y = 2(2) = 4 x ii) z = y 1 zx = y zy = – does not exist at y = 0 x z (1, 2) 2 so y y =– 1 1 2 =–4 2 iii) z = x3 + x2y + y4 zx = 3x2 + 2xy so zy = x2 + 4y3 so iv) zy = – v) =0 = 12 + 4(2)3 = 33 1 z = zx = – z (1, 2) y z (0, 0) x x2 + y2 x (x + y2)3/2 2 y (x + y2)3/2 2 so so z (0, 0) x does not exist (division by zero) z (1, 2) y = – z = exy cos(3y2) – 11 – 2 2 2 3/2 = – (1 + 2 ) 5 5 2 z (0, 0) x zx = yexy cos(3y2) so =0 zy = exy (xcos(3y2) – 6ysin (3y2)) so z (1, 2) y vi) = e2 (cos(12) – 12sin (12)) z = ln(1 + xy) y zx = 1 + xy x zy = 1 + xy so so z (0, 0) x z (1, 2) y =0 1 1 = 1+2 =3 vii) z = e–xy (2 + 3xy) zx = ye– xy (1 – 3xy) so z (1, 2) y zy = xe– xy (1 – 3xy) so viii) z (0, 0) x =0 = 1e– 2 (1 – 6) = – 5e– 2 x2 + y2 z = 1+y zx = zy = 3y2 + 4y – x2 2(1 + y)3/2 2x so 1+y so z (0, 0) x z (1, 2) y = =0 3(2)2 + 4(2) – 12 2(1 + 2)3/2 = 19 6 3 x ix) z = x3 tan–1y yx3 z (0, 0) zx = 3x tan y + 2 2 so x x +y 2 –1x – 12 – does not exist x4 z (1, 2) zy = – 2 2 so y x +y 5. 14 1 =– 2 2 =–5 1 +2 Determine all first order partial derivatives i) w = x2 + 2y2 + 3z2 ii) w = iii) w = xyz v) w = e xy 1 1 – x2 – y2 – z2 iv) w = x cos(x + yz) ln(x + y + z) Solution Again, little more than standard plodding differentiation - except you might use symmetry sometimes to simplify the calculations. And, of course, we have three independent variables to contend with now! i) w = x2 + 2y2 + 3z2 wx = 2x ii) w = 1 2 2 2 1–x –y –z wy = 4y wz = 6z = (1 – x2 – y2 – z2)– 1/2 1 x wx = – 2 (1 – x2 – y2 – z2) – 3/2 (– 2x) = 2 (1 – x – y2 – z2)3/2 There is no need to repeat the calculations for y and z since the form of the results will clearly be the same and we will get wy = y (1 – x – y2 – z2)3/2 wz = z (1 – x – y2 – z2)3/2 2 2 iii) w = xyz – 13 – wx = yz wy = xz wz = xy iv) w = x cos(x + yz) wx = cos(x + yz) – xsin(x + yz) wy = – xzsin(x + yz) wz = – xysin(x + yz) v) w = exy ln(x + y + z) 1 wx = yexy ln(x + y + z) + exy x + y + z 1 = exy yln(x + y + z) + x + y + z 1 wy = xexy ln(x + y + z) + exy x + y + z (or use symmetry in x and y) 1 = exy xln(x + y + z) + x + y + z exy wz = x + y + z 6. Determine all second order partial derivatives for the functions in Q3. Solution More tedious practice in differentiation, using the results obtained in Q3. And, of course, remember that zxy = zyx i) z = x2 + y2 zx = 2x and zy = 2y So, differentiating a second time, zxx = (zx)x = (2x)x = 2 and similarly zyy = 2 and zxy = 0 – 14 – x ii) z = y 1 zx = y zy = – x y2 So zxx = zyy = zxy = 1 =0 x y 2x x – 2 = 3 y y y 1 1 y = – 2 y y iii) z = x3 + x2y + y4 zx = 3x2 + 2xy So zxx = 3x2 + 2xy) = 6x + 2y x ( zyy = zxy = iv) z = 1 2 x +y 2 zx = – zy = x2 + 4y3 x2 + 4y3) = 12y2 y ( 3x2 + 2xy) = 2x y ( = (x2 + y2)– 1/2 x (x + y2)3/2 2 and zy = – y (x + y2)3/2 2 So zxx = x 1 x(– 3/2) – 2 =– 2 – 2 (2x) 2 3/2 2 3/2 x (x + y ) (x + y ) (x + y2)5/2 – 15 – 1 3x2 – (x2 + y2) + 3x2 =– 2 – = (x + y2)3/2 (x2 + y2)5/2 (x2 + y2)5/2 2x2 – y2 = 2 (x + y2)5/2 zyy y = – 2 = y (x + y2)3/2 zxy = x x(– 3/2) – 2 =– 2 (2y) 2 3/2 y (x + y ) (x + y2)5/2 = v) 2y2 – x2 (by symmetry) (x2 + y2)5/2 3xy (x + y2)5/2 2 z = exy cos(3y2) zx = yexy cos(3y2) So zxx = zyy = zy = exy (xcos(3y2) – 6ysin (3y2)) yexy cos(3y2)) = y2exy cos(3y2) x ( xy e (xcos(3y2) – 6ysin (3y2))) y ( = xexy (xcos(3y2) – 6ysin (3y2)) + yexy (– 6yxcos(3y2) – 6sin (3y2) – 36y2cos(3y2)) = exy (x2 cos (3y2) – 12xy sin (3y2) – 6 sin (3y2) – 36 y2cos (3y2)) zxy = yexy cos(3y2)) y ( = exy cos(3y2) + xyexy cos(3y2) – 6y2exy sin(3y2) = exy (cos (3y2) + xy cos (3y2) – 6 y2sin (3y2)) – 16 – vi) z = ln(1 + xy) y zx = 1 + xy x zy = 1 + xy So zxx y2 y = =– x 1 + xy (1 + xy)2 zyy = zxy = x2 x 1 + xy = – y (1 + xy)2 1 xy 1 y 1 + xy = 1 + xy – = 2 y (1 + xy)2 (1 + xy) vii) z = e–xy (2 + 3xy) zx = ye– xy (1 – 3xy) So zxx = ye– xy (1 – 3xy)) = x ( zy = xe– xy (1 – 3xy) – xy e (y – 3xy2)) x ( = – ye– xy (y – 3xy2) + e– xy (– 3y2) = e– xy (– y2 + 3xy3 – 3y2) = e– xy (3xy3 – 4y2) Similarly, we can see from symmetry that zyy = zxy = xe– xy (1 – 3xy)) = e– xy (3x3y – 4x2) y ( – xy ye– xy (1 – 3xy)) = e (y – 3xy2)) y ( y ( = – xe– xy (y – 3xy2) + e– xy (1 – 6xy) = e– xy (– xy + 3x2y2 + 1 – 6xy) = e– xy (3x2y2 – 7xy + 1) – 17 – x2 + y2 z = 1+y viii) 3y2 + 4y – x2 zy = 2(1 + y)3/2 2x 1+y zx = So zxx = zyy 2x = x 1 + y 2 1+y 6y + 4 3 3y2 + 4y – x2 3y2 + 4y – x2 = = – y 2(1 + y)3/2 2(1 + y)3/2 2 2(1 + y)5/2 = 2(6y + 4)(1 + y) – 3(3y2 + 4y – x2) 4(1 + y)5/2 = 3y2 + 8y + 3x2 + 8 4(1 + y)5 /2 after a bit of tidying up. zxy = 2x 2x 1 = 2x(1 + y)– 1/2) = – ( 3/2 y 1 + y y (1 + y) 2 =– x (1 + y)3/2 x ix) z = x3 tan–1y yx3 x zx = 3x2 tan–1y + 2 x + y2 zy = – x4 x2 + y2 So zxx yx3 2 –1x = 3x tan y + 2 x x + y2 1 3x2y yx3 = 6xtan y + 3x 1/(1 + (x/y) ) y + 2 – 2 2 (2x) x + y2 (x + y2)2 –1x 2 2 – 18 – and you can regard it as an algebra test to show that this reduces to 2x4y + 6x2y3 x = 6x tan–1y + (x2 + y2)2 x4 2x4y – 2 = y x + y2 (x2 + y2)2 zyy = For zxy it is probably easier in this case to evaluate zyx, ie do the y– derivative first. Then zxy 7. x4 – 4x3 = – = – 2 x x2 + y2 x + y2 x4 (2x) – 2x5 – 4x3y2 + 2 = (x2 + y2)2 (x + y2)2 Determine all second order partial derivatives for Q5 i), iii), iv). Solution i) w = x2 + 2y2 + 3z2 wx = 2x wy = 4y wxx = 2x = 2 x ( ) wyy = 4y = 4 y ( ) wzz = 6z = 6 z ( ) So and wxy = wxz =wyz = 0 iii) w = xyz – 19 – wz = 6z wx = yz wy = xz wxx = yz = 0 x ( ) wyy = xz = 0 y ( ) wzz = xy = 0 z ( ) wxy = yz = z y ( ) wxz = yz = y z ( ) wyz = xz = x z ( ) So wz = xy and iv) w = x cos(x + yz) wx = cos(x + yz) – xsin(x + yz) wy = – xzsin(x + yz) wz = – xysin(x + yz) So wxx = cos(x + yz) – xsin(x + yz)) = – 2sin(x + yz) – xcos(x + yz) x ( wyy = – xzsin(x + yz) ) = – xz2cos(x + yz) y ( wzz = – xysin(x + yz) ) = – xy2cos(x + yz) z ( – 20 – 8. wxy = – xzsin(x + yz) ) = – zsin(x + yz) – xzcos(x + yz) x ( wxz = – xysin(x + yz)) = – ysin(x + yz) – xycos(x + yz) x ( wyz = – xysin(x + yz)) = – xsin(x + yz) – xyzcos(x + yz) y ( 2 Show that T(x, t) = ae–b t cos bx, where a and b are arbitrary constants, satisfies the equation T 2T = t x2 Solution 2 With T(x, t) = ae– b t cos bx we have T 2 = – ab2e– b t cos bx t T 2 = – abe– b t sin bx x 2T T 2 – b2t cos bx = 2 = – ab e t x 9. Determine dz for the functions i) z = x2 – 3y2 iii) z = ln(x2 + y2) v) z = x2e–xy ii) z = 3x2y3 iv) z = cos(x + y) Solution To find the total derivative, all we need is the first order derivatives of the function. We will do the first question in detail and the rest in outline, for you to fill in the gaps. i) For z = x2 – 3y2 we have – 21 – z = 2x x z = – 6y y So dz = z z dx + dy = 2xdx – 6ydy x y ii) z = 3x2y3 dz = iii) z z dx + dy = 6xy3 dx + 9x2y2dy x y z = ln(x2 + y2) dz = z z 2x 2y dx + dy = 2 dy 2 dx + 2 x y x +y x + y2 iv) z = cos(x + y) dz = – sin(x + y)dx – sin(x + y)dy v) z = x2e–xy dz = (2xe–xy – x2ye–xy)dx – x3e–xydy = xe–xy((2 – xy)dx – x2dy 10. If z = 3x2 + 2xy – y2 and x and y vary with time t according to x dz = 1 + sin t and y = 3 cos t–1 evaluate dt directly and by using the total derivative (chain) rule. Solution If z = 3x2 + 2xy – y2 and x = 1 + sin t , y = 3 cos t – 1 then dz z dx z dy dx dy = + = (6x + 2y) + (2x – 2y) dt dt dt x dt y dt = (6x + 2y) cos t – 3(2x – 2y) sin t = (6(1 + sin t) + 2(3 cos t – 1)) cos t – 3(2(1 + sin t) – 2(3 cos t – 1)) sin t – 22 – = 6(cos2 t + 4cos t sin t – sin2 t – 2 sin t) + 4 cos t = 6(cos 2t + 2sin 2t – 2 sin t) + 4 cos t = 6cos 2t + 12sin 2t – 12 sin t + 4 cos t On the other hand, substituting first for x and y in terms of t in the expression for z we have z = 3x2 + 2xy – y2 = 3(1 + sin t)2 + 2(1 + sin t)(3 cos t – 1) – (3 cos t – 1)2 = 3 sin2 t – 9 cos2 t + 3 sin 2t + 4 sint + 12 cos t and then differentiation with respect to t gives dz dt = 6 sin t cos t + 18 cos t sin t + 6 cos 2t + 4 cos t – 12 sin t = 12 sin 2t + 6 cos 2t – 12 sin t + 4 cos t agreeing with the previous result. – 23 –