M1120 Calculus (VIII) Lecture

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Math1120 - Mathematics II

Calculus (VIII): Chain Rules

§1 The Single Variable Chain Rule

Recall that the chain rule for functions of one variable says:

dy dy dx
If y = y ( x) and x = x (t ) then = .
dt dx dt

df
Example 1: Use the chain rule to find if f (u) = sin (u ) and u ( x) = x 2 + 1
dx

Via the chain rule:


df df du
=
dx du dx
= cos(u )(2 x)
= 2 x cos( x 2 + 1)

With multivariable functions there are many ways in which to form composite
functions but there will be a chain rule for each possibility. In the following sections we will
look at some of these.

§2 Multivariable Chain Rules

Begin by considering the case where z = z ( x, y ) and x = x (t ) , y = y (t ) . In this case we


can think of z as defining a real valued function z = z (t ) .

Example 2: If z = x 2 + 2 xy + 3 y 2 and x = t + 1 , y = t − 1 then find zʹ′(t ) by substituting


the expressions for x and y into z and then differentiating.

On substituting x and y into z


z (t ) = (t + 1) 2 + 2(t + 1)(t − 1) + 3(t − 1) 2
.
= 6t 2 − 4t + 2
Thus
dz
= 12t − 4 .
dt

Now for a function f of two variables the linear approximation (or “small change“)
formula says:
∂f ∂f
Δf ; Δx + Δy .
∂x ∂y
Thus
Δf ∂f Δx ∂f Δy
; + .
Δt ∂x Δt ∂y Δt

Page 77
Calculus (VIII) - Lecture Notes

This formula becomes more accurate as Δt → 0 and from the limit we obtain the following
chain rule.

Chain Rule 1
If z = z ( x, y ) and x = x (t ) , y = y (t ) are differentiable functions then
dz ∂z dx ∂z dy
= . + .
dt ∂x dt ∂y dt

Example 3: If z = x 2 + 2 xy + 3 y 2 and x = t + 1 , y = t − 1 then find zʹ′(t ) by using the


chain rule.

Here
∂z ∂z dx dy
= 2x + 2 y , = 2x + 6 y , =1= .
∂x ∂y dt dt
So, via the chain rule
dz
= (2 x + 2 y ) ×1 + (2 x + 6 y ) ×1
dt
= 4x + 8 y .
= 4(t + 1) + 8(t − 1)
= 12t − 4

Example 4: Use the chain rule to find zʹ′(t ) when z( x, y) = x2 + y 2 and


2t −2t
x(t ) = e , y(t ) = e .

Here
∂z x ∂z y dx dy
= , = , = 2e2t , = −2e −2t
∂x x2 + y 2 ∂y x2 + y 2 dt dt

So, via the chain rule


dz x y
= × 2e2t + × (−2e −2t )
dt 2
x +y 2
x +y2 2

e2t 2e2t e −2t 2e −2t


= − .
e 4t + e −4t e 4t + e −4t
2 ( e6t − e −2t )
=
e8 t + 1

Example 5: The radius of a right circular cone is increasing at a rate of 1.8 cm/s while
its height is decreasing at a rate of 2.5 cm/s. At what rate is the volume of the cone
changing when the radius is 120 cm and the height is 140 cm?

The volume, V, of right circular cone of radius r and height h is

Page 78
Math1120 - Mathematics II

1
V ( r , h) = π r 2 h .
3
Since both radius and the height are functions of time t, i.e. r = r (t ) and h = h(t ) , we
can think of the volume as a function of time as well, i.e. V = V (t ) , and the problem is
dV
asking us to find when r = 120 and h = 140 . Now, by the chain rule:
dt
dV ∂V dr ∂V dh
= + .
dt ∂r dt ∂h dt
Here
∂V 2 ∂V 1 2
= π rh and = πr
∂r 3 ∂h 3

dr dh dh
and we are given that = 1.8 and = −2.5 . (Note that is negative because the
dt dt dt
height is decreasing.) Thus, at r = 120 and h = 140

dV 2π π
= ×120 ×140 +1.8 − ×1202 × 2.5
dt 3 3
3
= 8160π (cm /s)

Consider the case now where z = z (u ) and u = u ( x, y ) . In this case we can think of z as
defining a function of two variables z = z ( x, y ) and hence has partial derivatives with respect
to these variables. The relevant chain rules for this case are:

Chain Rule 2
If z = z (u ) and u = u ( x, y ) are differentiable functions then
∂z dz ∂u ∂z dz ∂u
= . and = .
∂x du ∂x ∂y du ∂y

Example 6: A spherical balloon holds a fixed amount of gas but its volume is dependent
on the pressure P and temperature T of the gas according to
T
V = k , k a constant.
P
Determine expressions for the rate of change of the radius r of the balloon with respect
to the pressure and temperature of the gas.

The volume, V, of a sphere of radius r is


4
V = π r3 .
3
Thus we can think of the radius of the balloon as a function of its volume, i.e
1
1
⎛ 3 ⎞ 3
r (V ) = CV where C = ⎜
3
⎟ ,
⎝ 4π ⎠
where the volume is, in turn, a function of the pressure and temperature of the
gas, i.e.

Page 79
Calculus (VIII) - Lecture Notes

V ( P, T ) = kP −1T .
Using chain rule 2:
∂r dr ∂V
=
∂P dV ∂P
2
⎛ 1 − ⎞
= ⎜ CV 3 ⎟ ( − kTP −2 )
⎝ 3 ⎠
1 13 13 − 34
= − Ck T P
3
Similarly
∂r dr ∂V
=
∂T dV ∂T
2
⎛ 1 − ⎞
= ⎜ CV 3 ⎟ ( kP −1 )
⎝ 3 ⎠
1 1 − 2 −1
= Ck 3T 3 P 3
3

∂z ∂z
Example 7: Use the appropriate chain rules to calculate and when
∂x ∂y
u
z= and u = 3x5 − 5xy 2 .
u +1
Using Chain Rule 2:
∂z dz ∂u ∂z dz ∂u
= and =
∂x du ∂x ∂y du ∂y

Now, (via the quotient rule)


dz (u + 1)(1) − u (1) 1
= 2
=
du (u + 1) (u + 1)2
and
∂u ∂u
= 15 x 4 − 5 y 2 and = −10 xy .
∂x ∂y
Thus
∂z 15 x 4 − 5 y 2 ∂z −10 xy
= and =
5 2
∂x (3x − 5 xy + 1) 2
∂y (3x − 5 xy 2 + 1)2
5

Next consider the case where z = z ( x, y ) and x = x( s, t ) , y = y ( s, t ) . In this case we


can think of z as defining a function of two variables z = z ( s, t ) . The relevant chain rules for
this case are:

Page 80
Math1120 - Mathematics II

Chain Rule 3
If z = z ( x, y ) and x = x( s, t ) , y = y ( s, t ) are differentiable functions then
∂z ∂z ∂x ∂z ∂y
= . + .
∂s ∂x ∂s ∂y ∂s
∂z ∂z ∂x ∂z ∂y
= . + .
∂t ∂x ∂t ∂y ∂t

∂z ∂z
Example 8: Use the appropriate chain rules to find and when
∂s ∂t
x
z= and x = set , y = 1 + se−t
y
Here
∂z 1 ∂z x
= , =− 2
∂x y ∂y y
and
∂x ∂x ∂y ∂y
= et , = set , = e−t , = − se − t .
∂s ∂t ∂s ∂t

Thus, by Chain Rule 3


∂z ∂z ∂x ∂z ∂y
= +
∂s ∂x ∂s ∂y ∂s
t
⎛ 1 ⎞ t ⎛ − se ⎞ − t
− t ⎟ (
= ⎜ e ) + ⎜ − t 2 ⎟ (
e )
⎝ 1 + se ⎠ ⎝ (1 + se ) ⎠
et
=
(1 + se − t ) 2
and
∂z ∂z ∂x ∂z ∂y
= +
∂t ∂x ∂t ∂y ∂t
t
⎛ 1 ⎞ t ⎛ − se ⎞
= ⎜
⎝ 1 + se − t ⎟
⎠
( se ) + ⎜
(1 + se − t 2 ⎟ (
)
− se −t )
⎝ ⎠
set + 2s 2
=
(1 + se − t ) 2

The chain rules given above are just special cases of the general chain rule.

The General Chain Rule


If z = z ( x1 ,L , xn ) is a differentiable function of the n variables x1 ,L , xn and each
xi = xi (t1 ,L , tm ) is a differentiable function of the m variables t1 ,L , tm then
∂z ∂z ∂x1 ∂z ∂xn
= . +L + .
∂ti ∂x1 ∂ti ∂xn ∂ti
for each i = 1,L , m .

Page 81
Calculus (VIII) - Lecture Notes

∂w
Example 9: Find if w( x, y, z ) = 2 x 2 + 5 y 2 + z 3 and
∂u
x ( r , s , t , u ) = r + s + t + u , y ( r , s, t , u ) = r 2 , z ( r , s , t , u ) = r − s + t − u

By the general Chain Rule


∂w ∂w ∂x ∂w ∂y ∂w ∂z
= + +
∂u ∂x ∂u ∂y ∂u ∂z ∂u
1
⎛ 1 − ⎞
= ( 4 x )(1) + (10 y )( 0 ) + ( 3z 2 ) ⎜ (r − s + t − u ) 2 ( −1) ⎟
⎝ 2 ⎠
3 r − s +t −u
= 4(r + s + t + u ) −
2

Example Tasks

∂z ∂z
ET 1: Use the appropriate chain rules to find and when
∂x ∂y
z (u, v) = u 2v + ev and u ( x, y ) = ln( y − x) , v( x, y ) = x + xy

ET 2: Two straight roads intersect at right angles. Car A is moving on one road
approaches the intersection at 25km/h while Car B moving on the other road
approaches the intersection at 30km/h. At what rate is the distance between the cars
changing when A is 0.3 km from the intersection and B is 0.4 km from the intersection?

ET 3*: Show that any function of the form


z = f ( x + at ) + g ( x − at )
is a solution of the wave equation
∂2 z 2
2 ∂ z
=a
∂t 2 ∂x 2

* d 2z
ET 4 (a) If z = z ( x, y ) and x = x(θ ) and y = y (θ ) find an appropriate chain rule for
dθ 2
d 2z
(b) Using the result of part (a) find 2
when z ( x, y) = x 2 + 2 y and x (θ ) = 5cos (θ )

and y (θ ) = 5sin (θ ) .

Page 82
Math1120 - Mathematics II

§3 Implicit Differentiation

We can use our chain rules to produce another way looking at implicit differentiation.
Assuming that the equation
F ( x, y ) = 0
implicitly defines the function y = y ( x) , recall that implicit differentiation gives us a way of
dy
finding a formula for .
dx

dy
Example 10: Use implicit differentiation to find a formula for for the function
dx
y = y ( x) implicitly defined by the equation
x cos( y ) + y cos( x) = x .

Differentiating both sides of the equation with respect to x

d d
( x cos( y) + y cos( x) ) = ( x )
dx dx
⎧ dy ⎫ ⎧ dy ⎫
⎨− x sin( y ) + cos( y ) ⎬ + ⎨− y sin( x) + cos( x) ⎬ = 1
⎩ dx ⎭ ⎩ dx ⎭
dy
( cos( x) − x sin( y) ) = 1 − cos( y) + y sin( x)
dx
dy 1 − cos( y ) + y sin( x)
=
dx cos( x) − x sin( y )

dy
To use the chain rules to find a formula for for the function implicitly defined by
dx
the equation
F ( x, y ) = 0 (1)
let
z = F ( x, y ) and x = x (t ) , y = y (t ) .

Thus we can think of F as being a function of the one variable t, and so, by Chain Rule 1,

dz ∂F dx ∂F dy
= + .
dt ∂x dt ∂y dt

Now we are thinking of equation (1) as defining a function of one variable y = y ( x) , so let
x = x and y = y ( x) and hence
dz ∂F ∂F dy dy
= ×1 + = Fx + Fy . (2)
dx ∂x ∂y dx dx

Returning to equation (1), on differentiating both sides with respect to x, we obtain

Page 83
Calculus (VIII) - Lecture Notes

dz d
= (0)
dx dx ,
dy
Fx + Fy =0
dx

from which we obtain, provided Fy ≠ 0 ,


dy F
=− x .
dx Fy

dy
Thus we can find a formula for via partial differentiation as opposed to implicit
dx
differentiation. In summary:

If the equation F ( x, y ) = 0 implicitly defines the function y = y ( x) then


dy F
= − x , provided Fy ≠ 0
dx Fy

dy
Example 11: Use partial differentiation to find a formula for for the function
dx
implicitly defined by the equation
x cos( y ) + y cos( x) = x .

Let
F ( x, y ) = x cos( y ) + y cos( x) − x .
Then
∂F ∂F
= cos( y) − y sin( x) − 1 and = − x sin( y ) + cos( x) .
∂x ∂y
Thus
dy F
=− x
dx Fy
1 + y sin( x) − cos( y )
=
cos( x) − x sin( y )

A similar argument can extend this result to functions of more than one variable. For
example:

If F ( x, y, z ) = 0 implicitly defines the function z = f ( x, y ) then


∂z F ∂z Fy
= − x and = − , provided Fz ≠ 0
∂x Fz ∂y Fz

Page 84
Math1120 - Mathematics II

∂z ∂z
Example 12: Use partial differentiation to find formulas for and for the function
∂s ∂t
z = z ( s, t ) implicitly defined by the equation
z 2 + cos(s) + ln(st ) = 3 .

Let
F ( s, t , z ) = z 2 + cos(s) + ln( st ) − 3 .
Then
1 1
Fs = − sin( s) + , Ft = , Fz = 2 z .
s t
Thus
∂z F ( sin( s) − 1 s )
=− s =
∂s Fz 2z
∂z F −1
=− t =
∂t Fz 2 zt

Example Tasks
∂z
ET 1: Using partial differentiation (as opposed to implicit differentiation) find at
∂x
( x, y, z ) = (1, 2,1) when the function z ( x, y ) is defined by the equation
( x − y)e z + ( y − z )e x + ( z − x)e y = 0 .

Page 85

You might also like