Review: Partial Differentiation Suppose f is a function of two, or more, independent variables. At each point within its domain, the function could have different instantaneous rates of change, in different directions we trace. These directional derivatives could be computed using the instantaneous rates of change of f along the directions of the coordinate axes (of the independent variables): the rates of change along those “principal directions” are called the partial derivatives of f. For a function of two independent variables, f (x, y), the partial derivative of f with respect to x can be found by applying all the usual rules of differentiation. The only exception is that, whenever and wherever the second variable y appears, it is treated as a constant in every respect. The partial derivative of f with respect to y can similarly be found by treating x as a constant whenever it appears. For a function of more than two independent variables, the same method applies. Its partial derivative with respect to, say, the variable x, can be obtained by differentiating it with respect to x, using all the usual rules of differentiation. Except that all the other independent variables, whenever and wherever they occur in the expression of f, are treated as constants. Notations of partial derivatives: Partial derivative of f w.r.t. x Partial derivative of f w.r.t. y … is analogous to this familiar notation … ∂f ∂x ∂f ∂y df dx fx fy f′ Example: Suppose f (x, y) = x9y8 + 2x + y3. Then f x = 9x8y8 + 2, f y = 8x9y7 + 3y2. xy Example: Suppose f (x, y) = e − ln(xy) + y2 sin(4x) + 2x3 − 5y. Then f x = ye xy − 1 + 4 y 2 cos( 4 x) + 6 x 2 , x f y = xe xy − 1 + 2 y sin( 4 x ) − 5 . y Higher Order Partial Derivatives A partial derivative of f could be differentiated again with respect to any of its independent variables. The result is a second partial derivative. Third, fourth, and higher order partial derivatives could similarly be obtained by repeated differentiations. The higher order partial derivatives need not to be derived from f with respect to the same variable. We can differentiate f with respect to a different independent variable than the previous one at each step. For example, consider a function of two independent variables, f (x, y). It has 4 possible second partial derivatives: ones that are obtained by differentiating it w.r.t. x twice, w.r.t. y twice, w.r.t. x first then y, and w.r.t. y first then x. Notations (of second partial derivatives): w.r.t. x twice w.r.t. y twice w.r.t. x, then y w.r.t. y, then x ∂ ∂ f ∂2 f = ∂ x ∂ x ∂ x 2 f xx ∂ ∂ f ∂2 f = ∂ y ∂ y ∂ y 2 f yy ∂ ∂ f ∂2 f = ∂ y ∂ x ∂ y ∂ x f xy ∂ ∂ f ∂2 f = ∂ x ∂ y ∂ x ∂ y f yx Example: Continue with the last example xy f (x, y) = e − ln(xy) + y2 sin(4x) + 2x3 − 5y, f x = ye xy − 1 1 + 4 y 2 cos( 4 x ) + 6 x 2 , and f y = xe xy − + 2 y sin( 4 x ) − 5 . y x f xx = 1 ∂ f x = y 2 e xy + 2 − 16 y 2 sin( 4 x ) + 12 x ∂x x f yy = ∂ 1 f y = x 2 e xy + 2 + 2 sin( 4 x ) ∂y y f xy = ∂ f x = (e xy + xye xy ) + 8 y cos( 4 x ) ∂y f yx = ∂ f y = (e xy + xye xy ) + 8 y cos( 4 x ) ∂x Notice that the two “mixed” second partial derivatives are the same. This is not a coincident. It is generalized in the following theorem, by Alexis Clairaut. Theorem: Suppose f is defined on a disc D, which contains the point (a, b). If the partial derivatives f xy and f yx are both continuous on D, then f xy(a, b) = f yx(a, b). By successively applying the above theorem, we see that, in general, the order in which partial differentiations are performed does not matter. What is important for higher order partial derivatives is, collectively, the total number of times with respect to each of the independent variables that the function is differentiated to obtain the said higher order partial derivative. This fact is best illustrated with an example. Example: Given a function of two variables, f (x, y), the following fifth order partial derivatives are identical. They are all obtained by differentiating f with respect to x three times and y twice. f xxxyy , f xyxyx , f yyxxx , f yxyxx. But they are different from either f xxxxy (obtained by differentiating w.r.t. x 4 times, and y once), or f yxyxy (w.r.t. x twice, and y 3 times). The Chain Rule A version (when x and y are themselves functions of a third variable t) of the Chain Rule of partial differentiation: Given a function of two variables f (x, y), where x =g(t) and y = h(t) are, in turn, functions of a third variable t. The partial derivative of f, with respect to t, is df ∂ f dx ∂ f dy = + dt ∂ x dt ∂ y dt . In the special case where the parameter t is x (i.e. x = t), and y is, therefore, an implicit function of x, i.e. y = h(x). The above becomes d f ∂ f dx ∂f dy ∂ f ∂ f dy = + = + . d x ∂ x dx ∂ y dx ∂ x ∂ y d x Integration To integrate a multi-variable function with respect to one of its independent variables, the same principle applies: treat all other independent variable(s) as constant(s), and integrate as usual. The only nuance is, again, arising from this treatment, as constants, of the other independent variable(s). To wit, the “constant” of integration when integrating with respect to, say x, is no longer necessarily an actual number. Instead, it could be, and usually is, a function consists of the other independent variable(s). This is due to the fact that when the integrand was originally derived by partial differentiation, any and all terms not containing x, but could have contained other variables, became zero. Therefore, when reversing the partial differentiation process via integration, we must account for those missing terms. Example: Suppose f ( x, y ) = ∫ x + 9 x 2 − 7 . Then y x 1 2 f ( x, y ) dx = ∫ + 9 x 2 − 7 dx = x + 3x 3 − 7 x + C ( y ) , 2y y x ∫ f ( x, y ) dy = ∫ y + 9 x 2 − 7 dy = x ln y + 9 x 2 y − 7 y + C ( x) . Exercises: 1 – 5 For each function below find all of its first and second partial derivatives. 1. f (x, y) = x5y10 2. f (x, y) = cos(xy) 3. f (x, y) = 6 + 3x – 7y3 x 4. f (x, y) = ye − x2y−2 + tan(y) 5. f (x, y, z) = x + 2y2 + 3z3 6. Find all distinct third partial derivatives of f (x, y) = x5y10. 7 – 10 Integrate each function (a) with respect to x, and (b) with respect to y. 7. f (x, y) = x5y10 8. f (x, y) = 2x sin(x2) − 2y x 9. f (x, y) = ye − x2y−2 + tan(y) xy 10. f (x, y) = e + x + 3 Answers: 1. f x = 5x4y10, f y = 10x5y9, f xx = 20x3y10, f yy = 90x5y8, f xy = 50x4y9 = f yx. 2. f x = −y sin(xy), f y = −x sin(xy), f xx = −y2 cos(xy), f yy = −x2 cos(xy), f xy = − sin(xy) − xy cos(xy) = f yx. 3. f x = 3, f y = −21y2, f xx = 0, f yy = −42y, f xy = 0 = f yx. x x x 4. f x = ye − 2xy−2, f y = e + 2x2y−3 + sec2(y), f xx = ye − 2y−2, x f yy = −6x2y−4 + 2sec2(y) tan(y), f xy = e + 4xy−3 = f yx. 5. f x = 1, f y = 2y, f z = 3z2, f xx = 0, f yy = 2, f zz = 6z, f xy = f yx = f xz = f zx = f yz = f zy = 0. 6. f xxx = 60x2y10, f yyy = 720x5y7, f xxy = 200x3y9, f xyy = 450x4y8. 1 6 10 1 5 11 7. (a) x y + C ( y ) (b) x y + C ( x) 6 11 2 8. (a) − cos(x ) − 2xy + C(y) (b) 2xy sin(x2) − y2 + C(x) x3 y2 x x2 x e + − ln cos y + C ( x) 9. (a) ye − 2 + x tan( y ) + C ( y ) (b) 3y 2 y 1 xy x 2 10. (a) e + + 3x + C ( y ) y 2 (b) 1 xy e + xy + 3 y + C ( x) x