The Chain Rule

For two functions \(f\) and \(g\) their composite, denoted \(f \circ g,\) is the function that results from applying \(g\) followed by \(f\). Symbolically, \({\bigl(f \circ {\color{SteelBlue} g}\bigr)(x) = f\bigl({\color{SteelBlue} g(x) }\bigr).}\) The chain rule is the name given to the formula for the derivative of the composite of two functions:

\(\displaystyle \Bigl(f\bigl({\color{SteelBlue} g(x)}\bigr)\Bigr)' = f'\bigl({\color{SteelBlue} g(x) }\bigr){\color{SteelBlue}\, g'(x) } \qquad \text{or} \qquad \frac{\mathrm{d}}{\mathrm{d}x}\Bigl( f\bigl({\color{SteelBlue} g(x)}\bigr) \Bigr) = \frac{\mathrm{d}}{\mathrm{d}x} f\bigl( {\color{SteelBlue} g(x)} \bigr) {\color{SteelBlue} \frac{\mathrm{d}}{\mathrm{d}x}\bigl(g(x)\bigr) } % \qquad \text{or} \qquad % \bigl(f \circ {\color{SteelBlue} g}\bigr)' = \bigl(f' \circ {\color{SteelBlue} g }\bigr)({\color{SteelBlue} g' }) \)

Take the derivative of the outer function \(f\) leaving the inner function \({\color{SteelBlue} g}\) the same, and then multiply by the derivative of the inner function \({\color{SteelBlue} g'}.\)

Two Examples

\(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x} \biggl( 4\bigl({\color{SteelBlue} 7x+2}\bigr)^3 \biggr) = 12\bigl({\color{SteelBlue} 7x+2}\bigr)^2{\color{SteelBlue} (7)}\qquad\)
\(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x} \biggl( \sin\bigl({\color{SteelBlue} x^7-x}\bigr) \biggr) = \cos\bigl({\color{SteelBlue} x^7-x}\bigr){\color{SteelBlue} (7x^6-1)}\)

The chain rule can be applied iteratively, to a composite of three or more functions, like un-nesting a set of matryoshka dolls.

\(\displaystyle \biggl(f\Bigl({\color{SteelBlue} g\bigl(}{\color{DarkGoldenRod} h(x)}{\color{SteelBlue}\bigr)}\Bigr)\biggr)' = f'\Bigl({\color{SteelBlue} g\bigl(}{\color{DarkGoldenRod} h(x)}{\color{SteelBlue}\bigr)}\Bigr) {\color{SteelBlue} g'\bigl(}{\color{DarkGoldenRod} h(x)}{\color{SteelBlue}\bigr)} {\color{DarkGoldenRod} h'(x)} \)