Preply — Study more efficiently by working with a personal tutor. Get 50% off.Affiliate

Wikipedia

Chain rule

In calculus, the chain rule is a formula that expresses the derivative of the composition of two differentiable functions z and y in terms of the derivatives of z and y. More precisely, if h = z ∘ y {\displaystyle h=z\circ y} is the composition such that h ( x ) = z ( y ( x ) ) {\displaystyle h(x)=z(y(x))} for every x, then the chain rule is, in Lagrange's notation,

h ′ ( x ) = z ′ ( y ( x ) ) y ′ ( x ) . {\displaystyle h'(x)=z'(y(x))y'(x).}

or, equivalently,

h ′ = ( z ∘ y ) ′ = ( z ′ ∘ y ) ⋅ y ′ . {\displaystyle h'=(z\circ y)'=(z'\circ y)\cdot y'.}

The chain rule may also be expressed in Leibniz's notation. If a variable z depends on the variable y, which itself depends on the variable x (that is, y and z are dependent variables), then z depends on x as well, via the intermediate variable y. In this case, the chain rule is expressed as

d z d x = d z d y ⋅ d y d x , {\displaystyle {\frac {dz}{dx}}={\frac {dz}{dy}}\cdot {\frac {dy}{dx}},} and

d z d x | x = d z d y | y ( x ) ⋅ d y d x | x , {\displaystyle \left.{\frac {dz}{dx}}\right|_{x}=\left.{\frac {dz}{dy}}\right|_{y(x)}\cdot \left.{\frac {dy}{dx}}\right|_{x},}

for indicating at which points the derivatives have to be evaluated. In integration, the counterpart to the chain rule is the substitution rule.

Intuitive explanation Intuitively, the chain rule states that knowing the instantaneous rate of change of z relative to y and that of y relative to x allows one to calculate the instantaneous rate of change of z relative to x as the product of the two rates of change. As put by George F. Simmons: "If a car travels twice as fast as a bicycle and the bicycle is four times as fast as a walking man, then the car travels 2 × 4 = 8 times as fast as the man." The relationship between this example and the chain rule is as follows. Let z, y and x be the (variable) positions of the car, the bicycle, and the walking man, respectively. The rate of change of relative positions of the car and the bicycle is d z d y = 2. {\textstyle {\frac {dz}{dy}}=2.} Similarly, d y d x = 4. {\textstyle {\frac {dy}{dx}}=4.} So, the rate of change of the relative positions of the car and the walking man is

d z d x = d z d y ⋅ d y d x = 2 ⋅ 4 = 8. {\displaystyle {\frac {dz}{dx}}={\frac {dz}{dy}}\cdot {\frac {dy}{dx}}=2\cdot 4=8.}

The rate of change of positions is the ratio of the speeds, and the speed is the derivative of the position with respect to the time; that is,

d z d x = d z d t d x d t , {\displaystyle {\frac {dz}{dx}}={\frac {\dfrac {dz}{dt}}{\dfrac {dx}{dt}}},}

or, equivalently,

d z d t = d z d x ⋅ d x d t , {\displaystyle {\frac {dz}{dt}}={\frac {dz}{dx}}\cdot {\frac {dx}{dt}},}

which is also an application of the chain rule.

History The chain rule seems to have first been used by Gottfried Wilhelm Leibniz. He used it to calculate the derivative of a + b z + c z 2 {\displaystyle {\sqrt {a+bz+cz^{2}}}} as the composite of the square root function and the function a + b z + c z 2 {\displaystyle a+bz+cz^{2}\!} . He first mentioned it in a 1676 memoir (with a sign error in the calculation). The common notation of the chain rule is due to Leibniz. Guillaume de l'Hôpital used the chain rule implicitly in his Analyse des infiniment petits. The chain rule does not appear in any of Leonhard Euler's analysis books, even though they were written over a hundred years after Leibniz's discovery. It is believed that the first "modern" version of the chain rule appears in Lagrange's 1797 Théorie des fonctions analytiques; it also appears in Cauchy's 1823 Résumé des Leçons données a L’École Royale Polytechnique sur Le Calcul Infinitesimal.

Statement The simplest form of the chain rule is for real-valued functions of one real variable. It states that if g is a function that is differentiable at a point c (i.e. the derivative g′(c) exists) and f is a function that is differentiable at g(c), then the composite function f ∘ g {\displaystyle f\circ g} is differentiable at c, and the derivative is

( f ∘ g ) ′ ( c ) = f ′ ( g ( c ) ) ⋅ g ′ ( c ) . {\displaystyle (f\circ g)'(c)=f'(g(c))\cdot g'(c).}

The rule is sometimes abbreviated as

( f ∘ g ) ′ = ( f ′ ∘ g ) ⋅ g ′ . {\displaystyle (f\circ g)'=(f'\circ g)\cdot g'.}

If y = f(u) and u = g(x), then this abbreviated form is written in Leibniz notation as:

d y d x = d y d u ⋅ d u d x . {\displaystyle {\frac {dy}{dx}}={\frac {dy}{du}}\cdot {\frac {du}{dx}}.}

The points where the derivatives are evaluated may also be stated explicitly:

d y d x | x = c = d y d u | u = g ( c ) ⋅ d u d x | x = c . {\displaystyle \left.{\frac {dy}{dx}}\right|_{x=c}=\left.{\frac {dy}{du}}\right|_{u=g(c)}\cdot \left.{\frac {du}{dx}}\right|_{x=c}.}

Carrying the same reasoning further, given n functions f 1 , … , f n {\displaystyle f_{1},\ldots ,f_{n}\!} with the composite function f 1 ∘ ( f 2 ∘ ⋯ ( f n − 1 ∘ f n ) ) {\displaystyle f_{1}\circ (f_{2}\circ \cdots (f_{n-1}\circ f_{n}))\!} , if each function f i {\displaystyle f_{i}\!} is differentiable at its immediate input, then the composite function is also differentiable by the repeated application of Chain Rule, where the derivative is (in Leibniz's notation):

d f 1 d x = d f 1 d f 2 d f 2 d f 3 ⋯ d f n d x . {\displaystyle {\frac {df_{1}}{dx}}={\frac {df_{1}}{df_{2}}}{\frac {df_{2}}{df_{3}}}\cdots {\frac {df_{n}}{dx}}.}

Applications

Composites of more than two functions The chain rule can be applied to composites of more than two functions. To take the derivative of a composite of more than two functions, notice that the composite of f, g, and h (in that order) is the composite of f with g ∘ h. The chain rule states that to compute the derivative of f ∘ g ∘ h, it is sufficient to compute the derivative of f and the derivative of g ∘ h. The derivative of f can be calculated directly, and the derivative of g ∘ h can be calculated by applying the chain rule again. For concreteness, consider the function

y = e sin ⁡ ( x 2 ) . {\displaystyle y=e^{\sin(x^{2})}.}

This can be decomposed as the composite of three functions:

y = f ( u ) = e u , u = g ( v ) = sin ⁡ v , v = h ( x ) = x 2 . {\displaystyle {\begin{aligned}y&=f(u)=e^{u},\\u&=g(v)=\sin v,\\v&=h(x)=x^{2}.\end{aligned}}}

So that y = f ( g ( h ( x ) ) ) {\displaystyle y=f(g(h(x)))} . Their derivatives are:

d y d u = f ′ ( u ) = e u , d u d v = g ′ ( v ) = cos ⁡ v , d v d x = h ′ ( x ) = 2 x . {\displaystyle {\begin{aligned}{\frac {dy}{du}}&=f'(u)=e^{u},\\{\frac {du}{dv}}&=g'(v)=\cos v,\\{\frac {dv}{dx}}&=h'(x)=2x.\end{aligned}}}

The chain rule states that the derivative of their composite at the point x = a is:

( f ∘ g ∘ h ) ′ ( a ) = f ′ ( ( g ∘ h ) ( a ) ) ⋅ ( g ∘ h ) ′ ( a ) = f ′ ( ( g ∘ h ) ( a ) ) ⋅ g ′ ( h ( a ) ) ⋅ h ′ ( a ) = ( f ′ ∘ g ∘ h ) ( a ) ⋅ ( g ′ ∘ h ) ( a ) ⋅ h ′ ( a ) . {\displaystyle {\begin{aligned}(f\circ g\circ h)'(a)&=f'((g\circ h)(a))\cdot (g\circ h)'(a)\\&=f'((g\circ h)(a))\cdot g'(h(a))\cdot h'(a)\\&=(f'\circ g\circ h)(a)\cdot (g'\circ h)(a)\cdot h'(a).\end{aligned}}}

In Leibniz's notation, this is:

d y d x = d y d u | u = g ( h ( a ) ) ⋅ d u d v | v = h ( a ) ⋅ d v d x | x = a , {\displaystyle {\frac {dy}{dx}}=\left.{\frac {dy}{du}}\right|_{u=g(h(a))}\cdot \left.{\frac {du}{dv}}\right|_{v=h(a)}\cdot \left.{\frac {dv}{dx}}\right|_{x=a},}

or for short,

d y d x = d y d u ⋅ d u d v ⋅ d v d x . {\displaystyle {\frac {dy}{dx}}={\frac {dy}{du}}\cdot {\frac {du}{dv}}\cdot {\frac {dv}{dx}}.}

The derivative function is therefore:

d y d x = e sin ⁡ ( x 2 ) ⋅ cos ⁡ ( x 2 ) ⋅ 2 x . {\displaystyle {\frac {dy}{dx}}=e^{\sin(x^{2})}\cdot \cos(x^{2})\cdot 2x.}

Another way of computing this derivative is to view the composite function f ∘ g ∘ h as the composite of f ∘ g and h. Applying the chain rule in this manner would yield:

( f ∘ g ∘ h ) ′ ( a ) = ( f ∘ g ) ′ ( h ( a ) ) ⋅ h ′ ( a ) = f ′ ( g ( h ( a ) ) ) ⋅ g ′ ( h ( a ) ) ⋅ h ′ ( a ) . {\displaystyle {\begin{aligned}(f\circ g\circ h)'(a)&=(f\circ g)'(h(a))\cdot h'(a)\\&=f'(g(h(a)))\cdot g'(h(a))\cdot h'(a).\end{aligned}}}

This is the same as what was computed above. This should be expected because (f ∘ g) ∘ h = f ∘ (g ∘ h). Sometimes, it is necessary to differentiate an arbitrarily long composition of the form f 1 ∘ f 2 ∘ ⋯ ∘ f n − 1 ∘ f n {\displaystyle f_{1}\circ f_{2}\circ \cdots \circ f_{n-1}\circ f_{n}\!} . In this case, define

f a . . b = f a ∘ f a + 1 ∘ ⋯ ∘ f b − 1 ∘ f b {\displaystyle f_{a\,.\,.\,b}=f_{a}\circ f_{a+1}\circ \cdots \circ f_{b-1}\circ f_{b}}

where f a . . a = f a {\displaystyle f_{a\,.\,.\,a}=f_{a}} and f a . . b ( x ) = x {\displaystyle f_{a\,.\,.\,b}(x)=x} when b < a {\displaystyle b<a} . Then the chain rule takes the form

D f 1 . . n = ( D f 1 ∘ f 2 . . n ) ( D f 2 ∘ f 3 . . n ) ⋯ ( D f n − 1 ∘ f n . . n ) D f n = ∏ k = 1 n [ D f k ∘ f ( k + 1 ) . . n ] {\displaystyle {\begin{aligned}Df_{1\,.\,.\,n}&=(Df_{1}\circ f_{2\,.\,.\,n})(Df_{2}\circ f_{3\,.\,.\,n})\cdots (Df_{n-1}\circ f_{n\,.\,.\,n})Df_{n}\\&=\prod _{k=1}^{n}\left[Df_{k}\circ f_{(k+1)\,.\,.\,n}\right]\end{aligned}}}

or, in the Lagrange notation,

f 1 . . n ′ ( x ) = f 1 ′ ( f 2 . . n ( x ) ) f 2 ′ ( f 3 . . n ( x ) ) ⋯ f n − 1 ′ ( f n . . n ( x ) ) f n ′ ( x ) = ∏ k = 1 n f k ′ ( f ( k + 1 . . n ) ( x ) ) {\displaystyle {\begin{aligned}f_{1\,.\,.\,n}'(x)&=f_{1}'\left(f_{2\,.\,.\,n}(x)\right)\;f_{2}'\left(f_{3\,.\,.\,n}(x)\right)\cdots f_{n-1}'\left(f_{n\,.\,.\,n}(x)\right)\;f_{n}'(x)\\[1ex]&=\prod _{k=1}^{n}f_{k}'\left(f_{(k+1\,.\,.\,n)}(x)\right)\end{aligned}}}

Quotient rule

The chain rule can be used to derive some well-known differentiation rules. For example, the quotient rule is a consequence of the chain rule and the product rule. To see this, write the function f(x)/g(x) as the product f(x) · 1/g(x). First apply the product rule:

d d x ( f ( x ) g ( x ) ) = d d x ( f ( x ) ⋅ 1 g ( x ) ) = f ′ ( x ) ⋅ 1 g ( x ) + f ( x ) ⋅ d d x ( 1 g ( x ) ) . {\displaystyle {\begin{aligned}{\frac {d}{dx}}\left({\frac {f(x)}{g(x)}}\right)&={\frac {d}{dx}}\left(f(x)\cdot {\frac {1}{g(x)}}\right)\\&=f'(x)\cdot {\frac {1}{g(x)}}+f(x)\cdot {\frac {d}{dx}}\left({\frac {1}{g(x)}}\right).\end{aligned}}}

To compute the derivative of 1/g(x), notice that it is the composite of g with the reciprocal function, that is, the function that sends x to 1/x. The derivative of the reciprocal function is − 1 / x 2 {\displaystyle -1/x^{2}\!} . By applying the chain rule, the last expression becomes:

f ′ ( x ) ⋅ 1 g ( x ) + f ( x ) ⋅ ( − 1 g ( x ) 2 ⋅ g ′ ( x ) ) = f ′ ( x ) g ( x ) − f ( x ) g ′ ( x ) g ( x )

Tags

  • Differentiation rules
  • Theorems in calculus
  • Theorems in mathematical analysis