LECTURE 11 - PARTIAL DIFFERENTIATION CHRIS JOHNSON Abstract Partial differentiation is a natural generalization of the differentiation of a function of a single variable that you are familiar with 1 Introduction Given a function of two variables, fx, y, we may like to know how the function changes as the variables change In general this is a complicated problem because the variables can change in so many different ways: one variable may increase exponentially as another decreases linearly; or one variable may decrease logarithmically while the other variable decreases quadratically; or many more complicated things could happen In order to make our lives easier we will first suppose that only one variable changes at a time, since this is most directly related to the derivatives of single-variable functions that we understand Example 11 As a motivating example, consider the function x fx, y = sinxy + cos The surface z = fx, y associated to this function consists of ripples and waves that change in complicated ways as we change x and y See Figure 1 Let s suppose that y is some fixed constant, say y =, and only x-varies Geometrically, we re intersecting the surface with the plane y = See Figures 2 and The intersection of our surface with the plane gives us a curve, which is naturally the graph of the function x F x = sinx + cos If we differentiate this function we have F x = cosx x2 x sin 1
2 CHRIS JOHNSON Figure 1 The surface z = sinxy + cos x Figure 2 The surface z = sinxy + cos with the plane y = x together Figure The graph of sinx + cos x This derivative represents how the elevation of the surface z = fx, y changes if we walk along the surface keeping y fixed at y =, but letting x change
LECTURE 11 - PARTIAL DIFFERENTIATION If we had instead picked y = 5 instead of y =, how would this change things? We intersect our surface with the plane y = 5 to get a different curve See Figure 4 Figure 4 Intersecting with y = 5 gives a different curve x Gx = sin5x + cos Now when we take the derivative we calculate, G x = 5 cos5x x2 x sin This is certainly a different derivative than what we calculated earlier, but it s very closely related to our previous derivative In particular, all of the s that came from y = before are now 5 s, which isn t too surprising 2 Partial Derivatives In general, we could calculate the derivative of fx, y after choosing y to be any constant we want Instead of picking a new constant each time, though, let s suppose that we don t pick the constant we want to plug in for y yet, but instead just keep in mind that y represents a constant whatever that constant may happen to be When we then differentiate fx, y, treating y as a constant, we re calculating the partial derivative of fx, y with respect to x Notationally this
4 CHRIS JOHNSON partial derivative is usually denoted x or f x Formally, it s defined as follows: fx 0 + h, y 0 fx 0, y 0 x = lim h 0 x0,y 0 h = lim x x0 fx, y 0 fx 0, y 0 x x 0 That is, we re calculate the derivative like normal, but we have this extra y thrown into our function In the formula for the derivative above, though, notice that only x is changing because of the x + h, and the y is not: the y is constant There s nothing special about x of course, we could repeat all of the above by letting y change and keeping x constant This is the partial derivative of fx, y with respect to y, which is denoted or f y y In terms of limits, fx 0, y 0 + h fx 0, y 0 y = lim h 0 x0,y 0 h = lim y y0 fx 0, y fx 0, y 0 y y 0 Notice that what we re doing is keeping one of the variable set to be a constant, and letting the other variable change We can then apply all of our usual calculus rules to determine the partial derivative: just pretend one of the variables is constant Example 21 Calculate and of fx, y = sinxy + cos x x y To calculate, just pretend that y is constant and apply your x usual rules from calculus, differentiating with respect to x: x2 x = y cosxy x sin To calculate partialf, repeat the process, but this time pretend x is y the constant and y the variable: y = x cosxy Example 22 Calculate both partial derivatives of z = x y + 2 xy z x =yxy 1 + 2 xy y ln2 z y =xy lnx + 2 xy x ln2
LECTURE 11 - PARTIAL DIFFERENTIATION 5 Higher-Order Partials Notice that given a function of two variables, fx, y, both of our derivatives and are again functions of x and y, so we can take x y the partial derivatives again If fx, y = x y 2 +cosxy, then we know x = x2 y 2 y sinxy We could then differentiate this derivative once again: x = 6xy 2 y 2 cosxy x This is called a second-order partial derivative of fx, y, and is denoted 2 f x 2 or f xx We didn t just have to take the partial with respect to x there: we could have taken the partial with respect to y of x y = 6x 2 y xy cosxy x This is another second-order derivative and is denoted 2 f y x or f xy We could of course keep doing this, calculating partial derivatives of our partial derivatives, and the notation extends the way you would expect:
6 CHRIS JOHNSON 2 f y =f 2 yy 2 f x y =f yx f x =f xxx f x 2 y =f yxx f x y x =f xyx x y =f 2 yyx When we take three partial derivatives, as in the case of where x 2 y we first differentiate with respect to y and then differentiate with respect to x two more times, we ve taken a third-order partial derivative If we calculate four partial derivatives, we ve taken a fourth-order partial derivative, and so on Any of these higher-order partial derivatives where we differentiate with respect to different variables is called a mixed partial derivative The second-order mixed partials are x y and y x Some of the third-order mixed partials are x y x, x 2 y, and yx 2 A reasonable question to ask would be how these mixed partial derivatives are related: Is there any relationship between f xy and f yx? This is answered by Clairaut s theorem Theorem 1 Clairaut s Theorem If f is defined in a neighborhood of x 0, y 0 and if f xy and f yx are both defined and continuous in this neighborhood, then f xy x 0, y 0 = f yx x 0, y 0 Corollary 2 Under all of the assumptions of Clairaut s theorem, we can move the order of differentiation around to our heart s content
LECTURE 11 - PARTIAL DIFFERENTIATION 7 for any n-th order partial derivative: 4 f x 2 y 2 = 4 f yx 2 y = 4 f xyxy = The assumptions in Clairaut s theorem will be satisfied for most of the functions we care about, and so for practical purposes, in this class f xy = f yx However, in general, it s possible to find functions that do not satisfy the assumptions of Clairaut s theorem, and in such situations there s no guarantee that the partial derivatives agree! 4 Functions of More Than Two Variables This notion partially differentiating a function of two variables naturally extends to partial derivatives of functions of any number of variables For a function of three variables, fx, y, z, for instance, we can define z = lim fx, y, z + h fx, y, z h 0 h To calculate we differentiate like normal, but now pretend that both z x and y are constants Example 41 Calculate of fx, y, z = z x2 y z 4 z = 4x2 y z This same idea works for any finite! number of variables If we have with twenty-six variables, given by the twenty-six letters of the English alphabet, to differentiate with respect to any one, we treat the other twenty-five as constant: 2 l u a b c l 5 mu u sinx = l 5 m sinxu sinx 1 l = 5l 4 m