Partial Derivatives for Math 229 Our puropose here is to explain how one computes partial derivatives. We will not attempt to explain how they arise or why one would use them; that is left to other courses e.g., multivariate calculus or electromagnetism. Unlike the usual situation in first semester calculus, we start with a function of two or more variables. Two examples of such functions are fx, y = sinxy and gx, y, z = x 2 +xy 2 z 4xyz 2. For each variable there is a corresponding partial derivative. For example, for a function fx, y of the two variables x and y there are two partial derivatives partial derivatives are defined by and = lim fx + h, y fx, y h 0 h = lim h 0 fx, y + h fx, y. h and. Technically speaking these When it comes to computing such things, you need only remember the following: To compute the partial derivative with respect to a variable, you use the same derivative rules and formulas as usual while treating the other variables as constants. The following two examples should help show how one computes partial derivatives. Example 1: Set fx, y = sinxy. To compute the partial derivative we will use the chain rule, constant multiple rule, the formula for the derivative of the sine function and the formula for the derivative of a power. Setting u = xy for the chain rule and treating y as a constant, we have = sinxy = sin u = d sin u du y = cos u y replacing xy with u using the chain rule using a formula and the constant multiple rule = cosxy y replacing u with xy and using another formula. Compare this with how you would compute the derivative of sinπx. Hint: you would use the exact same steps! Example 2: Set gx, y, z = x 2 + xy 2 z 4xyz 2. To compute the partial derivative g we will use the sum/difference rule, constant multiple rule, the formula for the derivative of a constant, 1
and the formula for the derivative of a power. Treating both x and z as constants so x 2 and z 2 are constants, too, we have g = x 2 + xy 2 z 4xyz 2 = 2 + xy2 z 4xyz 2 = 0 + xz 2 4xz 2 using the sum/difference rule by formula and the constant multiple rule = 0 + xz 2y 4xz 2 1 by the power formula. Compare this with how you would compute the derivative of e 2 + ey 2 π 4eyπ 2. Just as with usual derivatives in first semester calculus, we have higher order partial derivatives as well. A big difference is that with partial derivatives there are several second derivatives instead of just one. For instance, if we start with a function fx, y of two variables, we have not one, but four ways to partially differentiate twice: 2 2 partially differentiate with respect to x twice, partially differentiate with respect to y twice, partially differentiate with respect to y then x, partially differentiate with respect to x then y. In a more expanded notation, 2 = / 2 = / = / = /. Example 3: Set fx, y = xye x 4x 2 cosx + y. We will compute the four second order 2
partial derivatives. First, using u for x + y in the chain rule we have = xye x 4x 2 cosx + y = xyex 4x 2 cosx + y = y xex 4 x 2 cosx + y = y x ex 2 cosx + y + ex 4 x + cosx + y 2 = yxe x + e x 4 x 2 cos u + cosx + y2x = yxe x + e x 4 x 2 d cos u x + y + cosx + y2x du = yxe x + e x 4 x 2 sin u + + cosx + y2x = yxe x + e x 4 x 2 sinx + y1 + 0 + cosx + y2x = yxe x + e x + 4x 2 sinx + y 8x cosx + y. Remember we treat y as a constant here. Next = xye x 4x 2 cosx + y = xyex 4x 2 cosx + y Remember we treat x as a constant here. = xe x cosx + y 4x2 = xe x 4x 2 cos u = xe x 4x 2 d cos u x + y du = xe x 4x 2 sin u + = xe x + 4x 2 sinx + y0 + 1 = xe x + 4x 2 sinx + y. Before we compute the second order partial derivatives, we note from above that xe x dx = xe x + e x, and in an entirely similar fashion sinx + y cosx + y = cosx + y and = sinx + y, 3 sinx + y cosx + y = cosx + y. = sinx + y,
We have 2 = / = yxe x + e x + 4x 2 sinx + y 8x cosx + y = yxe x + e x + 4x 2 sinx + y 8x cosx + y = y xex + e x + 4 x 2 sinx + y 8 x cosx + y xe x = y + ex 2 sinx + y + 4 x + sinx + y 2 cosx + y 8 x + cosx + y = yxe x + e x + e x + 4x 2 cosx + y + sinx + y2x 8 x sinx + y + cosx + y = yxe x + 2e x + 4x 2 cosx + y + 16x sinx + y 8 cosx + y, using our formulas above. The next three are a little bit simpler: 2 = / = xe x + 4x 2 sinx + y = xex + 4x 2 sinx + y 2 sinx + y = 0 + 4x = 4x 2 cosx + y, = / = xe x + 4x 2 sinx + y = xex + 4x 2 sinx + y = xe x + e x + 4 x 2 sinx + y = xe x + e x 2 sinx + y + 4 x + sinx + y 2 = xe x + e x + 4 x 2 cosx + y + sinx + y2x = xe x + e x + 4x 2 cosx + y + 8x sinx + y, 4
and = / = yxe x + e x + 4x 2 sinx + y 8x cosx + y = yxe x + e x + 4x 2 sinx + y 8x cosx + y = xe x + e x sinx + y cosx + y + 4x2 8x = xe x + e x + 4x 2 cosx + y + 8x sinx + y. Notice how the two mixed partials 2 f and 2 f are equal. According to Clairaut s Theorem, this will always be the case when these two mixed partial derivatives are continuous. Any functions you come across in this class will be this way, so you can just assume that 2 f = 2 f. Exercises Find the first partial derivatives of the given function. 1. fx, y = y 5 3xy 2. fx, y = x 4 y 2 + 9x 2 y 3. gx, y = tanxy 2 4. hx, y = x2 +3y x+y 2 5. hx, y, z = x lny + z 2 + e xyz Find all of the second partial derivatives of the given function. 6. gx, y = xy x y 7. hx, y, z = xyz + xy 2 z 3 Verify the conclusion of Clairaut s Theorem, i.e., show that the two mixed partial derivatives are equal, for the following functions. 8. fx, y = e xy sin y 9. gx, y = tan 1 yx 2 + y 2 5