Uploaded by ditshwenerebafilwe

0930 partial derivatives

advertisement
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 fx and fy (or ft ):
(a) f (x, y) = x3 − 3xy 2
(c) f (x, y) = x2 e−x
2 −y 2
(b) f (x, y) = exy
2
(d) f (x, t) = e−(x+t)
We can compute higher order derivatives by simply repeating the process. For example,
∂ ∂f
∂ 2f
∂ ∂f
∂ 2f
=
,
and
fxx = (fx )x =
=
.
fxy = (fx )y =
∂y ∂x
∂y∂x
∂x ∂x
∂x2
2. Compute the four second partial derivatives fxx , fxy , fyx , and fyy for the following functions.
(a) f (x, y) = x3 − 3xy 2
(b) f (x, y) = exy
3. Here is a contour plot for some function f (x, y).
1.5
0.1
1.0
0.1
0.25
0.5
Q
0.25
0.35
0.0
0.35
0.15
0.15
0.2
0.3
0.3
0.2
-0.5
P
-1.0
0.05
0.05
-1.5
-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 fx (a, b)?
(b) What is the sign of fy (c, d)?
(c) What is the sign of fxx (c, d)?
(d) What is the sign of fxy (a, b)?
Suppose you happen to know that the function is f (x, y) = x2 e−x
which satisfy fx (x, y) = fy (x, y) = 0.
2 −y 2
. Find the points (x, y)
Clairaut’s Theorem. You may notice that fxy = fyx in Problem 2. This holds in general:
If fxy and fyx are both continuous, then fxy = fyx .
4. Compute the derivatives of the following functions:
(a) fxyxyxy if f (x, y) = x2 cos (ey + y 2 )
(b) fxxxyy if f (x, y) = x3 y 2 −
y
x+log(x)
(c) fxyxyx if f (x, y) = x2 y(ecos 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: ft = fx
(b) Wave Equation: ftt = fxx
2
f (x, t) = e−(x+t) ,
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 fx (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
0
f (t)g(t) = f 0 (t) g(t) + f (t) g 0 (t)
• Chain Rule
0
f (g(t)) = g 0 (t) f 0 (g(t))
Typical examples are:
n
n−1
d
g(t) = n g 0 (t) g(t)
,
dt
d g(t)
e = g 0 (t) eg(t) ,
dt
d
sin(g(t)) = g 0 (t) cos(g(t)),
dt
d
cos(g(t)) = −g 0 (t) sin(g(t)),
dt
d
g 0 (t)
log(g(t)) =
.
dt
g(t)
If you regard g(t)) as some “chunk”, you can easily imagine the derivative.
• Quotient Rule
f (t)
g(t)
0
=
f 0 (t) g(t) − f (t) g 0 (t)
2
g(t)
1. (a) For f (x, y) = x3 − 3xy 2 , we get first derivatives
fx = 3x2 − 3y 2
fy = −6xy.
and
0
(b) Remember the chain rule tells you eg(t) = g 0 (t)eg(t) . In what follows, your g(t) will be
either (constant “y”)x or (constant “x”) sin(y). For f (x, y) = exy , we get first derivatives
fx = yexy
(c) For f (x, y) = x2 e−x
fx = 2x e−x
2 −y 2
2 −y 2
fy = xexy .
and
, we get first derivatives
+(−2x)x2 e−x
2 −y 2
2 −y 2
= 2x e−x
−2x3 e−x
2 −y 2
and
fy = −2yx2 e−x
2 −y 2
2
(d) For f (x, t) = e−(x+t) , we get first derivatives
fx = −2(x + t)e−(x+t)
2
and
2
ft = −2(x + t)e−(x+t) .
2. (a) From Problem 1 (a), we know
fx = 3x2 − 3y 2
fy = −6xy.
and
So the second derivatives are
fxx =
and
fxy = fyx = −6y
∂ 2f
= 6x,
∂x2
fyy =
∂ 2f
= −6x,
∂y 2
∂ 2f
∂ 2f
where fxy =
and fyx =
.
∂y∂x
∂x∂y
(b) From Problem 1 (b), we know
fx = yexy
and
fy = xexy
So the second derivatives are
fxx
fyy
fxy
fyx
= y 2 exy ,
= x2 exy ,
= exy + xyexy ,
= exy + xyexy .
Note that fxy = fyx holds. (Clairaut’s Theorem!)
3. (a) fx (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) fy (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) fxx (c, d) < 0
fxx stands for the rate of change of the x-slope in positive x-direction. First we know
fx (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 fx (c, d) < 0 and the latter implies fxx (c, d) < 0
(d) fxy (a, b) > 0
fxy stands for the rate of change of the x-slope in positive y-direction. First we know
fx (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,
fx > 0 around P , so you don’t need to worry about the absolute value of the x-slope.)
From Problem 1 (c), we know
fx = 2x e−x
2 −y 2
− 2x3 e−x
2 −y 2
= 2x(1 − x2 )e−x
2 −y 2
and
fy = −2yx2 e−x
2 −y 2
.
So solving the simultaneous equations fx = 0 and fy = 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:
f = x2 cos ey + y 2
fx = 2x cos ey + y 2
fxx = 2 cos ey + y 2
fxxx = 0;
so fxyxyxy = fxxxyyy = 0.
(b) Here we take the y derivatives first. We get
y
x + ln(x)
1
fy = 2x3 y −
x + ln(x)
3
fyy = 2x ,
f = x3 y 2 −
and so (after more derivatives) fyyxxx = 2 · 3 · 2 = 12. Thus fxxxyy = 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:
where g(x, y) = x2 yecos x
f (x, y) = g(x, y)+h(x, y)
and h(x, y) = −x2 y log(y 2 +1).
Then fxyxyx = gxyxyx + h(xyxyx) and
gxyxyx = gyyxxx = 0
hxyxyx = gxxxyy = 0.
Hence fxyxyx = 0.
5. What you need to do is to compute
fx ,
ft ,
fxx ,
ftt
gx ,
gt ,
and check whether they satisfy the equations.
gxx ,
gtt
hx ,
ht ,
hxx ,
htt
If you actually compute them, you will get
2
fx = −2(x + t)e−(x+t) ,
2
ft = −2(x + t)e−(x+t) ,
2
fxx = 4(x + t)2 − 2 e−(x+t) ,
2
ftt = 4(x + t)2 − 2 e−(x+t) ,
gx = cos(x − t) + cos(x + t),
gt = − cos(x − t) + cos(x + t),
gxx = − sin(x − t) − sin(x + t),
gtt = − sin(x − t) − sin(x + t),
hx = −t sin(xt),
ht = −x sin(xt),
hxx = −t2 cos(xt),
htt = −x2 cos(xt).
Then you find three relations
fx = ft ,
So the answer is as follows:
(a) f
(b) f and g
fxx = ftt
and
gxx = gtt .
Download