22.5. THE CHAIN RULE 475
To do this,
Df (u1,u2) =
(2u1 11 cosu2
),Dg (x1,x2,x3) =
(x2 x1 11 2x2 0
).
Then
Df (g (x1,x2,x3)) =
(2(x1x2 + x3) 1
1 cos(x2
2 + x1) )
and so by the chain rule,
D(f ◦g)(x1,x2,x3)
=
Df(g(x))︷ ︸︸ ︷(2(x1x2 + x3) 1
1 cos(x2
2 + x1) )
Dg(x)︷ ︸︸ ︷(x2 x1 11 2x2 0
)=
((2x1x2 +2x3)x2 +1 (2x1x2 +2x3)x1 +2x2 2x1x2 +2x3x2 + cos
(x2
2 + x1)
x1 +2x2(cos(x2
2 + x1))
1
)Therefore, in particular,
∂ f1 ◦g∂x1
(x1,x2,x3) = (2x1x2 +2x3)x2 +1,
∂ f2 ◦g∂x3
(x1,x2,x3) = 1,∂ f2 ◦g
∂x2(x1,x2,x3) = x1 +2x2
(cos(x2
2 + x1))
.
etc.
In different notation, let(
z1z2
)= f (u1,u2) =
(u2
1 +u2sin(u2)+u1
). Then
∂ z1
∂x1=
∂ z1
∂u1
∂u1
∂x1+
∂ z1
∂u2
∂u2
∂x1= 2u1x2 +1 = 2(x1x2 + x3)x2 +1.
Example 22.5.7 Let
f (u1,u2,u3) =
z1z2z3
=
u21 +u2u3u2
1 +u32
ln(1+u2
3)
and let
g (x1,x2,x3,x4) =
u1u2u3
=
x1 + x22 + sin(x3)+ cos(x4)
x24 − x1
x23 + x4
.
Find (f ◦g)′ (x).
Df (u) =
2u1 u3 u22u1 3u2
2 00 0 2u3
(1+u23)
Similarly,
Dg (x) =
1 2x2 cos(x3) −sin(x4)−1 0 0 2x40 0 2x3 1
.