3: Partial Derivatives,
14.4: The Chain Rule, and
14.5: Directional Derivatives and Gradient Vectors
TA: Sam Fleischer
November 10
defines z as a function of two independent variables x and y and the partial derivative exists.
d d
(yz − ln z) = (x + y)
dx dx
1
∂z 1 ∂z
y − =1+0
∂x z ∂x
1 ∂z
y− =1
z ∂x
∂z x
=
∂x yz − 1
∂ 2f ∂ 2f
or f xx , or fyy
∂x2 ∂y 2
∂ 2f ∂ 2f
or fyx , and = fxy
∂x∂y ∂y∂x
The defining equations are
∂ 2f ∂ 2f
∂ ∂f ∂ ∂f
= , =
∂x2 ∂x ∂x ∂x∂y ∂x ∂y
∂ 2f
Note that fyx = means you first take the derivative with respect to y, and then take the
∂x∂y
derivate with respect to x.
f (x, y, z) = 1 − 2xy 2 z + x2 y
fy = −4xyz + x2
fyx = −4yz + 2x
fyxy = −4z
fyxyz = −4
2
Definition: Differentiability
A function z = f (x, y) is differentiable at (x0 , y) if fx (x0 , y0 ) and fy (x0 , y0 ) exists and ∆z satisfies
an equation of the form
in the value of f that results from moving from (x0 , y0 ) to another point (x0 + ∆x, y0 + ∆y) in R
satisfies an equation of the form
Corollary of Theorem 3
If the partial derivatives fx and fy of a function f (xy) are continuous throughout an open region
R, then f is differentiable at every point of R.
dw
= fx (x(t), y(t)) · x0 (t) + fy (x(t), y(t)) · y 0 (t)
dt
or
dw ∂f dx ∂f dy
= +
dt ∂x dt ∂y dt
3
Theorem 6: Chain Rule for Functions of One Independent Variable and Three Inter-
mediate Variables
If w = f (x, y, z) is differentiable and x, y, and z are differentiable functions of t, then w is a
differentiable function of t and
dw ∂w dx ∂w dy ∂w dz
= + +
dt ∂x dt ∂y dt ∂z dt
Example
dw
Find if
dt
w = xy + z, x = cos t, y = sin t, z=t
Use Theorem 6:
dw ∂w dx ∂w dy ∂w dz
= + +
dt ∂x dt ∂y dt ∂z dt
= (y)(− sin t) + (x)(cos t) + (1)(1)
= (sin t)(− sin t) + (cos t)(cos t) + 1
= − sin2 t + cos2 t + 1
= cos 2t + 1
Theorem 7: Chain Rule for Two Independent Variables and Three Intermediate Vari-
ables
Suppose that w = f (x, y, z), x = g(r, s), y = h(r, s), and z = k(r, s). If all four functions are
differentiable, then w has partial derivatives with respect to r and s given by the formulas
∂w ∂w ∂x ∂w ∂y ∂w ∂z
= + +
∂r ∂x ∂r ∂y ∂r ∂z ∂r
∂w ∂w ∂x ∂w ∂y ∂w ∂z
= + +
∂s ∂x ∂s ∂y ∂s ∂z ∂s
dy Fx
=−
dx Fy
4
Example
dy
Find if y 2 − x2 − sin xy = 0.
dx
dy Fx
=−
dx Fy
−2x − y cos xy
=−
2y − x cos xy
2x + y cos xy
=
2y − x cos xy
∂z Fx ∂z Fy
=− and =−
∂x Fz ∂y Fz
x1 = g1 (t1 , t2 , . . . , tm )
x2 = g2 (t1 , t2 , . . . , tm )
..
.
xn = gn (t1 , t2 , . . . , tm )
Then w is a differential function of each of the independent variables t1 , t2 , . . . , tm , and the partial
derivatives of w with respect to each ti are
n
∂w ∂w ∂x1 ∂w ∂x2 ∂w ∂xn X ∂w ∂xi
= + + ··· + =
∂t1 ∂x1 ∂t1 ∂x2 ∂t1 ∂xn ∂t1 i=1
∂xi ∂t1
n
∂w ∂w ∂x1 ∂w ∂x2 ∂w ∂xn X ∂w ∂xi
= + + ··· + =
∂t2 ∂x1 ∂t2 ∂x2 ∂t2 ∂xn ∂t2 i=1
∂xi ∂t2
..
.
n
∂w ∂w ∂x1 ∂w ∂x2 ∂w ∂xn X ∂w ∂xi
= + + ··· + =
∂tm ∂x1 ∂tm ∂x2 ∂tm ∂xn ∂tm i=1
∂xi ∂tm
More compactly,
n
∂w X ∂w ∂xi
= for j = 1, 2, . . . , m
∂tj i=1
∂xi ∂tj
5
Directional Derivatives and Gradient Vectors
Definition: Directional Derivative
The derivative of f at P0 (x0 , y0 ) in the direction of the unit vector u = u1 i = u2 j is the
number
df f (x0 + su1 , y0 + su2 ) − f (x0 , y0 )
= lim
ds u,P0 s→0 s
In words, the derivative of f at P0 in the direction of u is the dot product of the gradient ∇f at
P0 and u. In brief,
(Du )f = ∇f · u
Example
Find the derivative of f (x, y) = xey + cos xy at the point (2, 0) in the direction of v = 3i − 4j.
First, find the unit direction vector
v v 3 4
u= = = i− j
kvk 5 5 5
Then we need to find the partial derivatives of f at (2, 0) because together, they make up the
gradient, ∇f .
fx = ey − y sin xy
fx (2, 0) = e0 − 0 sin(2 · 0) = 1 − 0 = 1
fy = xey − x sin xy
fy (2, 0) = 2e0 − 2 sin(2 · 0) = 2 − 0 = 2
6
Plug these values into the definition of gradient.
∇f |(2,0) = fx (2, 0)i + fy (2, 0)j
= i + 2j
Then the directional derivative of f at (2, 0) in the direction of u is
(Du f )(2,0) = ∇f |(2,0) · u
3 4
= i − j · (i + 2j)
5 5
3 4
= −2·
5 5
= −1
2. Similarly, f decreases most rapidly in the direction of −∇f . The derivative in this direction
is
Du f = k∇f k cos π = −k∇f k
7
Important Concept
At every point (x0 , y0 ) in the domain of a differentiable function f (x, y), the gradient of
f is normal to the level curve through (x0 , y0 ).