MA2104 Week 03
MA2104 Week 03
1 Partial derivatives
Tangent planes
Differentiability & Linear approximations
2 Chain Rule
Implicit differentiation
3 Directional derivatives
1/80
Partial derivatives
f (x + h) − f (x)
f ′ (x) = lim
h→0 h
2/80
Partial derivatives
f (x + h, y) − f (x, y)
fx (x, y ) = lim ,
h→0 h
f (x, y + h) − f (x, y)
fy (x, y) = lim .
h→0 h
Other notations:
∂f
fx = .
∂x
∂f
fy = .
∂y
3/80
Partial derivatives
Example 1
For f (x, y ) = exy + yx , compute fx and fy .
1
fx (x, y ) = yexy + .
y
4/80
Partial derivatives
5/80
Partial derivatives
6/80
Partial derivatives
7/80
Partial derivatives
∂f ∂w
fx = =
∂x ∂x
∂f ∂w
fy = =
∂y ∂y
∂f ∂w
fz = = .
∂z ∂z
8/80
Partial derivatives
9/80
Partial derivatives
10/80
Partial derivatives
Example 2
Find all second-order partial derivatives of
f (x, y ) = x 2 y − y 3 + ln x.
1
fx = 2xy + ,
x
fy = x 2 − 3y 2 .
11/80
Partial derivatives
Then we have
∂ 1 1
fxx = ∂x 2xy + x = 2y − x2
,
∂ 1
fxy = ∂y 2xy + x = 2x,
∂
x 2 − 3y 2
fyx = ∂x = 2x,
∂
x 2 − 3y 2
fyy = ∂y = −6y.
12/80
Partial derivatives
13/80
Partial derivatives
14/80
Tangent planes
Recall that we can use the derivative f ′ (a) to get the tangent
line to the curve y = f (x) at x = a:
15/80
Tangent planes
16/80
Tangent planes
n · ⟨x − a, y − b, z − c⟩ = 0
where n is a vector normal to the plane.
17/80
Tangent planes
18/80
Tangent planes
⟨0, 1, fy (a, b)⟩ × ⟨1, 0, fx (a, b)⟩ = ⟨fx (a, b), fy (a, b), −1⟩.
19/80
Tangent planes
20/80
Tangent planes
Example 3
Find the tangent plane to the elliptic paraboloid z = 2x 2 + y 2 at
the point (1, 1, 3).
Solution. Notice
z = 4x + 2y − 3.
21/80
Tangent planes
The figure shows the elliptic paraboloid and its tangent plane at
(1, 1, 3) that we found in the preceding example
■
22/80
Differentiability & Linear approximations
Definition 4 (Increment)
Let z = f (x, y). Suppose △x and △y are increments in the
independent variable x and y respectively from a fixed point
(a, b).
Then the increment in z at (a, b) is defined by
23/80
Differentiability & Linear approximations
Example 4
Let z = 2x 2 − xy. Find △z at (x, y).
Solution.
24/80
Differentiability & Linear approximations
25/80
Differentiability & Linear approximations
Definition 5
We say that f is differentiable at (a, b) if the tangent plane at
(a, b) is a good approximation to f at points close to (a, b).
26/80
Differentiability & Linear approximations
27/80
Differentiability & Linear approximations
Example 5
Using the formal definition, show that z = f (x, y) = 2x 2 − xy is
differentiable on the entire xy-plane.
28/80
Differentiability & Linear approximations
△z = fx △x + fy △y + ϵ1 △x + ϵ2 △y
where
ϵ1 = 2△x and
ϵ2 = −△x.
29/80
Differentiability & Linear approximations
Theorem 7
Suppose z = f (x, y) is differentiable at (a, b). Let △x and △y
be small increments in x and y respectively from (a, b).
Then
30/80
Differentiability & Linear approximations
f (a + △x, b + △y , c + △z) ≈
f (a, b, c) + fx (a, b, c)△x + fy (a, b, c)△y + fz (a, b, c)△z.
32/80
Differentiability & Linear approximations
Example 6
The base radius and height of a circular cone are measured as
10cm and 25cm respectively, with a possible error in
measurement of as much as 0.1cm in each.
33/80
Differentiability & Linear approximations
2πrh πr 2
△V ≈ Vr △r + Vh △h = △r + △h.
3 3
500π 100π
dV = (0.1) + (0.1) = 20π.
3 3
The maximum error required is 20πcm3 . ■
34/80
Differentiability & Linear approximations
' $
35/80
Differentiability & Linear approximations
' $
f differentiable =⇒ f continuous.
36/80
Differentiability & Linear approximations
' $
37/80
Differentiability & Linear approximations
Example 7
Let f be the function on R2 defined by
(
xy
x 2 +y 2
if (x, y) ̸= (0, 0),
f (x, y ) =
0 if (x, y) = (0, 0).
38/80
Differentiability & Linear approximations
Solution.
(a)
f (0 + h, 0) − f (0, 0)
fx (0, 0) = lim
h→0 h
h·0
2 2 − 0
= lim h +0
h→0 h
0
= lim
h→0 h
= 0.
Likewise,
fy (0, 0) = 0.
39/80
Differentiability & Linear approximations
Thus, the function f does not have a limit at (0, 0), so f is not
continuous at (0, 0), let alone be differentiable! ■
40/80
Chain Rule
dy dy dx
= .
dt dx dt
41/80
Chain Rule
42/80
Chain Rule
Example 8
For z = f (x, y ) = x 2 ey , x = g(t) = t 2 − 1 and y = h(t) = sin t,
find the derivative dz
dt .
dx dy
= 2t, = cos t.
dt dt
43/80
Chain Rule
dz ∂z dx ∂z dy
= +
dt ∂x dt ∂y dt
44/80
Chain Rule
45/80
Chain Rule
∂z ∂f ∂x ∂f ∂y
= + .
∂t ∂x ∂t ∂y ∂t
46/80
Chain Rule
47/80
Chain Rule
Example 9
∂z ∂z
If z = ex sin y , where x = st 2 and y = s2 t, find ∂s and ∂t .
∂z ∂z ∂x ∂z ∂y
= +
∂s ∂x ∂s ∂y ∂s
48/80
Chain Rule
∂z ∂z ∂x ∂z ∂y
= +
∂t ∂x ∂t ∂y ∂t
49/80
Chain Rule
50/80
Chain Rule
51/80
Chain Rule
To find ∂z
∂s , we find the product of the partial derivatives along
each path from z to s and then add these products:
∂z ∂z ∂x ∂z ∂y
= + .
∂s ∂x ∂s ∂y ∂s
∂z
Similarly, we find ∂t by using the paths from z to t.
52/80
Chain Rule
for each i = 1, . . . , m.
53/80
Chain Rule
Example 10
Write out the Chain Rule for the case where w = f (x, y , z, t)
and x = x(u, v ), y = y(u, v ), z = z(u, v ), t = t(u, v ).
54/80
Chain Rule
∂w ∂w ∂x ∂w ∂y ∂w ∂z ∂w ∂t
= + + + .
∂u ∂x ∂u ∂y ∂u ∂z ∂u ∂t ∂u
55/80
Chain Rule
∂w ∂w ∂x ∂w ∂y ∂w ∂z ∂w ∂t
= + + + .
∂v ∂x ∂v ∂y ∂v ∂z ∂v ∂t ∂v
56/80
Chain Rule
Example 11
If w = f (x 2 − y 2 , y 2 − x 2 ) and f is differentiable, show that
∂w ∂w
y +x = 0.
∂x ∂y
57/80
Chain Rule
u = x 2 − y 2, v = y 2 − x 2.
∂w ∂w ∂u ∂w ∂v ∂w ∂w
= + = (2x) + (−2x)
∂x ∂u ∂x ∂v ∂x ∂u ∂v
and
∂w ∂w ∂u ∂w ∂v ∂w ∂w
= + = (−2y) + (2y)
∂y ∂u ∂y ∂v ∂y ∂u ∂v
58/80
Chain Rule
Therefore
∂w ∂w
y +x
∂x ∂y
∂w ∂w ∂w ∂w
= (2xy) + (−2xy) + (−2xy) + (2xy) = 0.
∂u ∂v ∂u ∂v
■
59/80
Implicit differentiation
F (x, y , z) = 0
∂z
How to compute ??
∂x
60/80
Implicit differentiation
∂F ∂F ∂F ∂z
+ + = 0. (why?)
∂x ∂y ∂z ∂x
61/80
Implicit differentiation
∂F
Therefore, if ̸= 0, then
∂z
∂F
∂z ∂x Fx
= − ∂F =− .
∂x ∂z
Fz
62/80
Implicit differentiation
∂z Fx (x, y, z) ∂z Fy (x, y, z)
=− , =−
∂x Fz (x, y , z) ∂y Fz (x, y , z)
provided Fz (x, y, z) ̸= 0.
63/80
Implicit differentiation
Example 12
∂z
Find ∂x if
x 3 + y 3 + z 3 + 6xyz = 1.
Fx = 3x 2 + 6yz, Fz = 3z 2 + 6xy.
∂z Fx 3x 2 + 6yz
=− =− 2 .
∂x Fz 3z + 6xy
■
64/80
Directional derivatives
How to compute the slope when you are facing any given
direction, say north-east?
65/80
Directional derivatives
66/80
Directional derivatives
67/80
Directional derivatives
' $
68/80
Directional derivatives
Du f (x0 , y0 ) > 0
69/80
Directional derivatives
Du f (x0 , y0 ) < 0
70/80
Directional derivatives
• if u = i = ⟨1, 0⟩ then
Di f = fx .
• if u = j = ⟨0, 1⟩ then
Dj f = fy .
71/80
Directional derivatives
72/80
Directional derivatives
Proof. Define
73/80
Directional derivatives
∂f dx ∂f dy
g ′ (h) = + = fx (x, y)a + fy (x, y )b.
∂x dh ∂y dh
Substituting h = 0:
74/80
Directional derivatives
∂f ∂f
▽f (x, y) = ⟨fx , fy ⟩ = fx i + fy j = i+ j
∂x ∂y
75/80
Directional derivatives
▽f is read ‘del f ’.
Du f (x, y ) = ▽f (x, y ) · u
76/80
Directional derivatives
Example 13
Find the directional derivative of the function
f (x, y ) = x 2 y 3 − 4y at the point (2, −1) in the direction of the
vector v = 2i + 5j.
77/80
Directional derivatives
v 2 5
u= = √ i + √ j.
||v|| 29 29
Therefore
79/80
Directional derivatives
Du f (x0 , y0 , z0 ) = ▽f (x, y, z) · u
where
∂f ∂f ∂f
▽f = ⟨fx , fy , fz ⟩ = i+ j+ k
∂x ∂y ∂z
is the gradient vector.
80/80