472 CHAPTER 22. DERIVATIVE OF A FUNCTIONS OF MANY VARIABLES

Lemma 22.5.1 Let g : U → Rp where U is an open set in Rn and suppose g has aderivative at x ∈U. Then o(g (x+v)−g (x)) = o(v).

Proof: Let

{|o(g(x+v)−g(x))||g(x+v)−g(x)| if g (x+v)−g (x) ̸= 0

0 if g (x+v)−g (x) = 0. Then limv→0 H (v) = 0 be-

cause of continuity of g at x and from 22.8,

|o(g (x+v)−g (x))||v|

= H (v)|g (x+v)−g (x)|

|v|≤CH (v)

Therefore, limv→0|o(g(x+v)−g(x))|

|v| = 0.Now with this lemma, the chain rule is as follows.

Theorem 22.5.2 (Chain rule) Let U be an open set in Rn, let V be an open set inRp, let g : U → Rp be such that g (U)⊆V , and let f : V → Rq. Suppose Dg (x) exists forsome x ∈U and that Df (g (x)) exists. Then D(f ◦g)(x) exists and furthermore,

D(f ◦g)(x) = Df (g (x))Dg (x) . (22.10)

In particular,∂ (f ◦g)(x)

∂x j=

p

∑i=1

∂f (g (x))

∂yi

∂gi (x)

∂x j. (22.11)

Proof: From the assumption that Df (g (x)) exists,

f (g (x+v)) = f (g (x))+Df (g (x))(g (x+v)−g (x))+o(g (x+v)−g (x))

= f (g (x))+Df (g (x))(Dg (x)v+o(v))+o(g (x+v)−g (x))

which by Lemma 22.5.1 equals

= f (g (x))+Df (g (x))Dg (x)v+Df (g (x))o(v)+o(v)

= f (g (x))+Df (g (x))Dg (x)v+o(v)

and this shows D(f ◦g)(x) = Df (g (x))Dg (x) from the definition of the derivative andits uniqueness established in Theorem 22.2.4 on Page 462.

There is an easy way to remember this in terms of the repeated index summation con-vention presented earlier. Let y = g (x) and z = f (y). Then the above says

∂z

∂yi

∂yi

∂xk=

∂z

∂xk. (22.12)

Remember there is a sum on the repeated index. In particular, for each index r,

∂ zr

∂yi

∂yi

∂xk=

∂ zr

∂xk.

The proof of this major theorem will be given later. It will include the chain rule forfunctions of one variable as a special case. First here are some examples.

Example 22.5.3 Let f (u,v) = sin(uv) and let u(x,y, t) = t sinx+ cosy and v(x,y, t,s) =s tanx+ y2 + ts. Letting z = f (u,v) where u,v are as just described, find ∂ z

∂ t and ∂ z∂x .