Uploaded by apriljoybaliga122600

30 Chain Rule and Implicit Differentiation

advertisement
Chain Rule and Implicit Differentiation
based on the notes of UP Diliman Institute of Maths
Math 37
Department of Math, Physics, and Computer Science, UP Mindanao
June 3, 2021
Chain Rule
Recall:
Suppose y is a differentiable function of x. Assume further that x is a
differentiable function of t. Then y is also a differentiable function of t.
Moreover,
dy dx
dy
=
·
.
dt
dx dt
For functions of several variables, we have the following analogous formulas.
Chain Rule
Let z be a differentiable function of x and y. In turn, suppose x and y are both
differentiable functions of t. Thus, z is also a differentiable function of a single
variable t. Moreover,
∂z dx ∂z dy
dz
=
·
+
·
.
dt
∂x dt
∂y dt
Chain Rule Diagram
Chain Rule
If z = f (x, y), where x = x(t) and y = y(t), then
dz
∂z dx ∂z dy
=
·
+
·
.
dt
∂x dt
∂y dt
Graphically, the tree of dependency is
z
∂z
∂x
x
∂z
∂y
y
dy
dt
dx
dt
t
t
Two-Variable Chain Rule
Example 1
dz
, without
Let z = x2 y, where x = t2 and y = t3 . Use chain rule to find
dt
direct substitution first.
Solution. We have
∂z dx ∂z dy
dz
=
·
+
·
dt
∂x dt
∂y dt
= (2xy)(2t) + (x2 )(3t2 )
= (2t5 )(2t) + (t4 )(3t2 )
= 7t6
Indeed, by direct calculation, z = x2 y = (t2 )2 (t3 ) = t7 . Thus,
dz
= 7t6 .
dt
Chain Rule for Several Variables
Chain Rule
Let z be a differentiable function of x and y.
In turn, suppose that x and y are differentiable functions of s and t.
Thus, z is also a differentiable function of s and t. Moreover,
∂z
∂z ∂x ∂z
=
·
+
∂s
∂x ∂s
∂y
∂z
∂z ∂x ∂z
=
·
+
∂t
∂x ∂t
∂y
∂y
,
∂s
∂y
·
.
∂t
·
z
∂z
∂y
∂z
∂x
x
∂x
∂s
s
y
∂x
∂t
t
∂y
∂s
s
∂y
∂t
t
Chain Rule
Example 2
s
Let z = exy , where x = 2s + t and y = .
t
∂z
∂z
and
at (s, t) = (−1, 1), using chain rule.
Find
∂s
∂t
Solution.
∂z
= yexy (2) + xexy
∂s
x
= exy 2y +
t
1
t
∂z
1
xy
xy
= ye (1) + xe
∂t
t
s xy
=e
y−x 2
t
If (s, t) = (−1, 1), then (x, y) = (−1, −1). Thus,
∂z
−1
(−1)(−1)
=e
2(−1) +
= −3e
∂s
1
∂z
−1
(−1)(−1)
=e
−1 − (−1)
= −2e
∂t
(1)2
General Chain Rule
General Chain Rule
Suppose that u is a differentiable function of n variables x1 , x2 , . . . , xn . In
turn, suppose each xi , i = 1, . . . , n, is a differentiable function of m variables
t1 , t2 , . . . , tm . Then u is also a differentiable function of the m variables
t1 , t2 , . . . , tm .
Moreover, for each j = 1, . . . , m, we have
∂u ∂x1
∂u ∂x2
∂u ∂xn
∂u
=
+
+ ··· +
.
∂tj
∂x1 ∂tj
∂x2 ∂tj
∂xn ∂tj
u
x1
t1
t2
···
x2
···
tm
t1
t2
···
tm
t1
t2
xn
···
tm
t1
t2
···
tm
Chain Rule
Example 3
Write out the chain rule for the following case:
z = z(x, y),
where x = x(r, s, u, v) and y = y(r, s, u, v)
z
x
r
s
∂z
∂z ∂x ∂z ∂y
=
+
∂r
∂x ∂r
∂y ∂r
∂z
∂z ∂x ∂z ∂y
=
+
∂s
∂x ∂s
∂y ∂s
y
u
v
r
s
u
v
∂z
∂z ∂x ∂z ∂y
=
+
∂u
∂x ∂u ∂y ∂u
∂z
∂z ∂x ∂z ∂y
=
+
∂v
∂x ∂v
∂y ∂v
Chain Rule
Example 4
Let u = x2 + yz, where x = pr cos θ, y = pr sin θ, z = p + r. Find up , ur , and
uθ when p = 2, r = 3 and θ = 0.
Solution. The appropriate chain rule is as follows:
up = ux xp + uy yp + uz zp
= 2x(r cos θ) + z(r sin θ) + y(1)
ur = ux xr + uy yr + uz zr
= 2x(p cos θ) + z(p sin θ) + y(1)
= 2x(p cos θ) + z(p sin θ) + y(1)
uθ = ux xθ + uy yθ
= 2x(−pr sin θ) + z(pr sin θ)
When p = 2, r = 3, θ = 0, we have
x = 2(3) cos 0 = 6,
y = 2(3) sin 0 = 0, z = 2 + 3 = 5. Thus,
we have
up = 2(6)(3 cos 0) + 5(3 sin 0) + 0(1) = 36
ur = 2(6)(2 cos 0) + 5(2 sin 0) + 0(1) = 24
uθ = 2(6)(0) + 5(2(3)(1)) = 30
Chain Rule
Example 5
Suppose z = x2 + xy with x = 2r − 2 and y = r2 + s. Find
∂2z
.
∂r2
Solution. Using chain rule,
∂z
∂z ∂x ∂z ∂y
=
·
+
·
= (2x + y)(2) + (x)(2r) = 4x + 2y + 2xr.
∂r
∂x ∂r
∂y ∂r
Applying product rule, we get
∂2z
∂
=
(4x + 2y + 2xr)
2
∂r
∂r
∂x
∂y
∂r
∂x
=4
+2
+ 2x
+ 2r
∂r
∂r
∂r
∂r
= 4(2) + 2(2r) + 2x(1) + 2r(2)
= 8 + 4r + 2x + 4r
Implicit Differentiation
Now consider x3 + y 3 = 6xy, where y is a differentiable function of x.
dy
is obtained by implicit differentiation.
Then dx
That is,
dy
dy
3x2 + 3y 2
= 6x
+ 6y
dx
d
6y − 3x2
dy
= 2
.
dx
3y − 6x
But two-variable chain rule can simplify such computation.
Thus,
Implicit Differentiation
Suppose y is a differentiable function of x, and that F (x, y) = 0 gives the
implicit relation between y and x.
F (x, y)
x
y
x
x
Differentiating with respect to x,
dx
dy
Fx (x, y)
+ Fy (x, y)
= 0.
dx
dx
This, with the above assumptions,
Implicit Function Theorem 1
dy
Fx (x, y)
=−
.
dx
Fy (x, y)
Implicit Function Theorem
Example 6
Compute for
dy
dx
if x3 + y 3 = 6xy.
Solution.
First, we write x3 + y 3 = 6xy as F (x, y) = 0, where
F (x, y) = x3 + y 3 − 6xy.
Therefore,
dy
Fx
=−
dx
Fy
=−
3x2 − 6y
3y 2 − 6x
Implicit Differentiation
Consider the equation
x3 + y 3 + z 3 = 1 − 6xyz
where z is a differentiable function of two independent variables x and y.
∂z
Then ∂x
may be obtained through implicit differentiation.
∂ 3
∂
(x + y 3 + z 3 ) =
(1 − 6xyz)
∂x
∂x ∂z
2
2 ∂z
3x + 0 + 3z
= 0 − 6yz + 6xy
∂x
∂x
Thus
(3z 2 + 6xy)
Note.
∂z
= −3x2 − 6yz
∂x
∂z
3x2 + 6yz
=− 2
∂x
3z + 6xy
∂z
∂z
3y 2 + 6xz
may be computed similarly, with
=− 2
.
∂y
∂y
3z + 6xy
Implicit Function Theorem
When x, y and z follow an implicit equation, computing for
simplified through a multivariate chain rule.
∂z
∂x
or
∂z
∂y
can be
F (x, y, z)
x
y
z
x
y
x y
If F (x, y, z) = 0 defines implicitly the relation between x, y and z.
Differentiating with respect to x, we get
dx
∂z
Fx (x, y, z)
+ Fz (x, y, z)
= 0.
dx
∂x
With the above assumptions,
Implicit Function Theorem 2
∂z
Fx
=− ,
∂x
Fz
∂z
Fy
=−
∂y
Fz
(We may also differentiate with respect to y and obtain a similar result.)
Implicit Function Theorem
Example 7
Let x3 + y 3 + z 3 = 1 − 6xyz, where z is a function of x and y. Find
∂z
∂z
and
.
∂x
∂y
Solution. Let us write x3 + y 3 + z 3 = 1 − 6xyz as F (x, y, z) = 0 where
F (x, y, z) = x3 + y 3 + z 3 + 6xyz − 1.
Therefore,
Fx
∂z
=−
∂x
Fz
3x2 + 6yz
=− 2
,
3z + 6xy
∂z
Fy
=−
∂y
Fz
3y 2 + 6xz
=− 2
.
3z + 6xy
Exercises
x2
r
∂z
for z = √ with x = 3rt and y = .
∂t
y
t
∂z
2) Use chain rule to find
for z = x2 + 3xyz + z 2 with x = 2t + 1, y = et
∂t
and z = 3 − t2 .
1) Use chain rule to find
3) Use chain
rule to find fss for f (x, y) = 2x + 4xy − y 2 with x = s + 2t and
√
y = t s.
4) Suppose f is a differentiable function of x and y, and
g(u, v) = f (eu + sin v, eu + cos v). Use the following table of values to
calculate gu (0, 0) and gv (0, 0).
(0, 0)
(1, 2)
5) Find
∂z
if x − z = tan−1 (yz).
∂y
f
3
6
g
6
3
fx
4
2
fy
8
5
Download