Books Sample

The chain rule

Composition of functions was (1.3). Differentiation of a composite is the same chain, walked backwards, with a factor for each step.

Theorem 2.3
If 𝑓𝑓 is differentiable at 𝑎𝑎 and 𝑔𝑔 is differentiable at 𝑓(𝑎)𝑓(𝑎), then 𝑔∘𝑓𝑔\circ 𝑓 is differentiable at 𝑎𝑎 and (𝑔∘𝑓)′(𝑎)=𝑔′(𝑓(𝑎))𝑓′(𝑎){(𝑔\circ 𝑓)}^{\prime }(𝑎)={𝑔}^{\prime }(𝑓(𝑎)){𝑓}^{\prime }(𝑎).

The right-hand side is a product of numbers, not a composition of functions. I keep wanting to write 𝑔′∘𝑓′{𝑔}^{\prime }\circ {𝑓}^{\prime }, which is a different object.

Why a naive cancellation is not a proof

The difference quotient of the composite is

𝑔(𝑓(𝑎+h))−𝑔(𝑓(𝑎))h=𝑔(𝑓(𝑎+h))−𝑔(𝑓(𝑎))𝑓(𝑎+h)−𝑓(𝑎)⋅𝑓(𝑎+h)−𝑓(𝑎)h,\frac{𝑔(𝑓(𝑎+h))-𝑔(𝑓(𝑎))}{h}=\frac{𝑔(𝑓(𝑎+h))-𝑔(𝑓(𝑎))}{𝑓(𝑎+h)-𝑓(𝑎)}\cdot \frac{𝑓(𝑎+h)-𝑓(𝑎)}{h},
(2.5)

when 𝑓(𝑎+h)≠𝑓(𝑎)𝑓(𝑎+h)\neq 𝑓(𝑎). The second factor tends to 𝑓′(𝑎){𝑓}^{\prime }(𝑎). The first looks like the difference quotient of 𝑔𝑔 at 𝑓(𝑎)𝑓(𝑎), with increment 𝑓(𝑎+h)−𝑓(𝑎)𝑓(𝑎+h)-𝑓(𝑎), which tends to 00 by Proposition 2.1. That almost gives 𝑔′(𝑓(𝑎))𝑓′(𝑎){𝑔}^{\prime }(𝑓(𝑎)){𝑓}^{\prime }(𝑎).

The gap is the vanishing of the denominator: 𝑓𝑓 may be locally constant, or may return to 𝑓(𝑎)𝑓(𝑎) for a sequence of h𝑛→0{h}_{𝑛}\to 0. Then (2.5) is not even written. The repair is to define an auxiliary function that agrees with the difference quotient of 𝑔𝑔 when the increment is nonzero and equals 𝑔′(𝑓(𝑎)){𝑔}^{\prime }(𝑓(𝑎)) when it is zero. Continuity of that auxiliary function at 00 saves the product. I am following the usual argument; a careful write-up is in Spivak (1967) and Rudin (1976).

Walking a long chain

The packed composition (1.5) is three functions. Theorem 2.3 twice, plus associativity (1.4), gives

𝑑𝑑𝑥sin⁡(𝑒𝑥2)=cos⁡(𝑒𝑥2)⋅𝑒𝑥2⋅2𝑥.\frac{𝑑}{𝑑𝑥}\sin ({𝑒}^{{𝑥}^{2}})=\cos ({𝑒}^{{𝑥}^{2}})\cdot {𝑒}^{{𝑥}^{2}}\cdot 2𝑥.
(2.6)

Each factor is the derivative of one layer, evaluated at the output of the layers to its right. That is the same reversed order as Proposition 1.2: undoing a composite, or differentiating it, both peel from the outside.

Example 2.3
Let 𝑔(𝑢)=𝑢2𝑔(𝑢)={𝑢}^{2} and 𝑓(𝑥)=𝑥+1𝑓(𝑥)=𝑥+1. Then (𝑔∘𝑓)(𝑥)=(𝑥+1)2(𝑔\circ 𝑓)(𝑥)={(𝑥+1)}^{2}, and Theorem 2.3 says the derivative is 2(𝑥+1)⋅12(𝑥+1)\cdot 1. Expanding by Theorem 2.1 and Theorem 2.2 gives the same 2𝑥+22𝑥+2.

If a factor has no derivative, the composite may still fail even when the outer function is smooth: composing 𝑥↦∣𝑥∣𝑥\mapsto |𝑥| with the identity is absolute value, which is not differentiable at 00 by Exercise 2.1. Conversely, a composite can succeed when I already know the closed form, as in Exercise 2.2, without the hypotheses of Theorem 2.3 applying to a particular factorization.

Exercise 2.3
Suppose 𝑓𝑓 is injective and differentiable near 𝑎𝑎, with 𝑓′(𝑎)≠0{𝑓}^{\prime }(𝑎)\neq 0, and 𝑓−1{𝑓}^{-1} is differentiable at 𝑓(𝑎)𝑓(𝑎). Differentiate 𝑓−1∘𝑓=𝐼{𝑓}^{-1}\circ 𝑓=𝐼 and recover (𝑓−1)′(𝑓(𝑎))=1𝑓′(𝑎){({𝑓}^{-1})}^{\prime }(𝑓(𝑎))=\frac{1}{{𝑓}^{\prime }}(𝑎).
Solution to Exercise 2.3
Definition 1.3 says 𝑓−1∘𝑓=𝐼𝐴{𝑓}^{-1}\circ 𝑓={𝐼}_{𝐴}. The right-hand side has derivative 11. Theorem 2.3 on the left gives (𝑓−1)′(𝑓(𝑎))𝑓′(𝑎)=1{({𝑓}^{-1})}^{\prime }(𝑓(𝑎)){𝑓}^{\prime }(𝑎)=1. Divide by 𝑓′(𝑎){𝑓}^{\prime }(𝑎).