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

 .

22.5. THE CHAIN RULE 475To do this,_ Quy 1 _ X2 XxX] 1Df (uy,u2) = ( Ll cosu ) sa m.t20%3) = ( 1 %& 0 ).Then2 (x1 x2 +.x3 1PF (a (a1,%2023)) = ( 1 cos (x3 +21) )and so by the chain rule,D(f 0g) (x1,*2,%3)Df (g(x)) Dg(«x)_ 2 (x1x2 +.x3) 1 x. x, 1~ 1 cos (x5 +21) 1 wm O_ (2x1x2 +2x3)x2 +1 (2xjx2+243)x,+2x2 2xpx2 +23~ x2 +008 (x3 +21) x1 + 2x2 (cos (x3 +21)) 1Therefore, in particular,Ofiog(x1,%2,X3) = (2x1x2 + 2x3) x2 + 1,OxOfrog OfrogOxoOn (x1,%2,.%3) =x) + 2x7 (cos (x3 +x)).(x1,*2,.%3) = 1,etc.2: . Za \ _ uy +u2In different notation, let ( 2 ) = f (uj,u2) = ( sin (uo) uy ). Thendz; Az, Ou, Az) AunOx, du, OX, | Duy Ox,Example 22.5.7 Let= 2ujx2 +1 = 2 (x1x2 +2x3)x2+ 1.ZI ut + U2U3f(ui,u2,u3)=|{ 2 J= uj +H}23 In (1 + U3)and letuy x1 +245 + sin (x3) + cos (x4)9 (X1,%2,%3,%4) = | uz J = xu —X1U3 x3 + X4Find (f og) (a).2u, 3 U2Df(u)= | 2m 3u5 oU30 0 GH)Similarly,1 2x2 cos(x3) —sin(x4)Dg(x)={ -1 0 0 2x40 0 2x3 1