Math 21a Partial Derivatives Fall, 2016 The solutions are available on our Canvas website (https://canvas.harvard.edu/courses/17064/). Choose Files > Koji s Section. What is the derivative?
1. For each of the following functions, compute both first partial derivatives f x and f y (or f t ): (a) f(x, y) = x 3 3xy 2 (b) f(x, y) = e xy (c) f(x, y) = x 2 e x2 y 2 (d) f(x, t) = e (x+t)2 We can compute higher order derivatives by simply repeating the process. For example, f xy = (f x ) y = ( ) f = 2 f y x y x, and f xx = (f x ) x = ( ) f = 2 f x x x. 2 2. Compute the four second partial derivatives f xx, f xy, f yx, and f yy for the following functions. (a) f(x, y) = x 3 3xy 2 (b) f(x, y) = e xy
3. Here is a contour plot for some function f(x, y). 1.5 1.0 0.1 0.1 0.5 0.25 0.25 Q 0.35 0.35 0.0 0.15 0.15 0.2-0.5 0.3 0.2 0.3-1.0 P -1.5 0.05 0.05-2 -1 0 1 2 We consider the two points P (a, b) and Q(c, d) on the contour map. Without actually computing the derivatives, answer the following questions: (a) What is the sign of f x (a, b)? (b) What is the sign of f y (c, d)? (c) What is the sign of f xx (c, d)? (d) What is the sign of f xy (a, b)? Suppose you happen to know that the function is f(x, y) = x 2 e x2 y 2. Find the points (x, y) which satisfy f x (x, y) = f y (x, y) = 0.
Clairaut s Theorem. You may notice that f xy = f yx in Problem 2. This holds in general: If f xy and f yx are both continuous, then f xy = f yx. 4. Compute the derivatives of the following functions: (a) f xyxyxy if f(x, y) = x 2 cos (e y + y 2 ) (b) f xxxyy if f(x, y) = x 3 y 2 y x+log(x) (c) f xyxyx if f(x, y) = x 2 y(e cos x log(y 2 + 1)) 5. In the next class, we discuss partial differential equations or PDEs. As a warm-up, for each of the following common PDEs, find a solution from the list of functions below. (a) Advection (Transport) Equation: f t = f x (b) Wave Equation: f tt = f xx f(x, t) = e (x+t)2, g(x, t) = sin(x t) + sin(x + t), h(x, t) = cos(xt).
Partial Derivatives Answers and Solutions How to compute partial derivatives? When you compute f x (x, y), you can just regard y as a constant and f(x, y) as a function of x. Then the partial derivative with respect to x is nothing but than the derivative of the function by x. This means if you want to compute partial derivatives, what you really need to recall is techniques of the differentiation of functions in one variable. Here are some important techniques: Product Rule ( f(t)g(t) ) = f (t) g(t) + f(t) g (t) Chain Rule ( f(g(t)) ) = g (t) f (g(t)) Typical examples are: d ( ) n g(t) = n g (t) ( g(t) ) n 1, dt d dt eg(t) = g (t) e g(t), d dt sin(g(t)) = g (t) cos(g(t)), d dt cos(g(t)) = g (t) sin(g(t)), d dt log(g(t)) = g (t) g(t). If you regard g(t)) as some chunk, you can easily imagine the derivative. Quotient Rule ( ) f(t) = f (t) g(t) f(t) g (t) ( ) g(t) 2 g(t)
1. (a) For f(x, y) = x 3 3xy 2, we get first derivatives f x = 3x 2 3y 2 and f y = 6xy. (b) Remember the chain rule tells you ( e g(t)) = g (t)e g(t). In what follows, your g(t) will be either (constant y )x or (constant x ) sin(y). For f(x, y) = e xy, we get first derivatives f x = ye xy and f y = xe xy. (c) For f(x, y) = x 2 e x2 y 2, we get first derivatives f x = 2x e x2 y 2 +( 2x)x 2 e x2 y 2 = 2x e x2 y 2 2x 3 e x2 y 2 and f y = 2yx 2 e x2 y 2. (d) For f(x, t) = e (x+t)2, we get first derivatives 2. (a) From Problem 1 (a), we know So the second derivatives are f x = 2(x + t)e (x+t)2 and f t = 2(x + t)e (x+t)2. f x = 3x 2 3y 2 and f y = 6xy. f xx = 2 f x 2 = 6x, f yy = 2 f y 2 = 6x, and f xy = f yx = 6y ( ) where f xy = 2 f y x and f yx = 2 f. x y (b) From Problem 1 (b), we know So the second derivatives are f x = ye xy and f y = xe xy f xx = y 2 e xy, f yy = x 2 e xy, f xy = e xy + xye xy, f yx = e xy + xye xy. Note that f xy = f yx holds. (Clairaut s Theorem!) 3. (a) f x (a, b) > 0 If you go along the positive x-direction from P, you will go up. So you have a positive slope in positive x-direction. (b) f y (c, d) < 0 If you go along the positive y-direction from Q, you will go down. So you have a negative slope in positive y-direction.
(c) f xx (c, d) < 0 f xx stands for the rate of change of the x-slope in positive x-direction. First we know f x (c, d) < 0 at Q as we are going down if we walk in positive x-direction. If you compare adjacent level curves around Q, the level curves become more closely spaced as we move to the right. This means the path becomes steeper (although still going down) in positive x-direction. Namely, the absolute value of x-slope is increasing in positive x-direction although x-slope is negative around Q. Hence the rate of change of the x-slope in positive x-direction is negative. Here is another explanation. If you visualize xz-cross section at Q from what we discussed above, then you will see the curve will be going down and concave down at Q. The former implies f x (c, d) < 0 and the latter implies f xx (c, d) < 0 (d) f xy (a, b) > 0 f xy stands for the rate of change of the x-slope in positive y-direction. First we know f x (a, b) > 0 at P as we are going up if we walk in positive x-direction. If you compare adjacent level curves around P, the level curves become more closely spaced as we move up. This means the paths from the left to the right become steeper in positive y-direction. Hence the rate of change of the x-slope in positive y-direction is positive. (In this case, f x > 0 around P, so you don t need to worry about the absolute value of the x-slope.) From Problem 1 (c), we know f x = 2x e x2 y 2 2x 3 e x2 y 2 = 2x(1 x 2 )e x2 y 2 and f y = 2yx 2 e x2 y 2. So solving the simultaneous equations f x = 0 and f y = 0, we get (x, y) = (0, t), (1, 0), ( 1, 0) where t is any number. Here is the graphs of z = f(x, y) from two perspectives. You can see (0, t) corresponds to the valley and the points (±1, 0) give two local maxima. In this way, you can use partial derivatives to find local maxima and minima (plus some junks). We will discuss local maxima and minima later in the class! 4. The point of these problems is to re-order the derivatives so that you take the easier derivatives first.
(a) Here we take the x derivatives first: so f xyxyxy = f xxxyyy = 0. f = x 2 cos ( e y + y 2) f x = 2x cos ( e y + y 2) f xx = 2 cos ( e y + y 2) f xxx = 0; (b) Here we take the y derivatives first. We get f = x 3 y 2 y x + ln(x) f y = 2x 3 1 y x + ln(x) f yy = 2x 3, and so (after more derivatives) f yyxxx = 2 3 2 = 12. Thus f xxxyy = 12 as well. (c) For this function, the first term is easy to differentiate with respect to y and the second term is easy to differentiate with respect to x. So we divide our function into two parts: f(x, y) = g(x, y)+h(x, y) where g(x, y) = x 2 ye cos x and h(x, y) = x 2 y log(y 2 +1). Then f xyxyx = g xyxyx + h(xyxyx) and Hence f xyxyx = 0. 5. What you need to do is to compute g xyxyx = g yyxxx = 0 h xyxyx = g xxxyy = 0. f x, f t, f xx, f tt g x, g t, g xx, g tt h x, h t, h xx, h tt and check whether they satisfy the equations.
If you actually compute them, you will get f x = 2(x + t)e (x+t)2, f t = 2(x + t)e (x+t)2, f xx = ( 4(x + t) 2 2 ) e (x+t)2, f tt = ( 4(x + t) 2 2 ) e (x+t)2, g x = cos(x t) + cos(x + t), g t = cos(x t) + cos(x + t), g xx = sin(x t) sin(x + t), g tt = sin(x t) sin(x + t), h x = t sin(xt), h t = x sin(xt), h xx = t 2 cos(xt), h tt = x 2 cos(xt). Then you find three relations f x = f t, f xx = f tt and g xx = g tt. So the answer is as follows: (a) f (b) f and g