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{maroon} g}\bigr)(x) = f\bigl({\color{maroon} g(x) }\bigr).}\) The chain rule is the name given to the formula for the derivative of the composite of two functions. \[ \bigl(f \circ {\color{maroon} g}\bigr)' = (f' \circ {\color{maroon} g })({\color{maroon} g' }) \quad \text{or} \quad \Bigl(f\bigl({\color{maroon} g(x)}\bigr)\Bigr)' = f'\bigl({\color{maroon} g(x) }\bigr){\color{maroon} g'(x) } \] Take the derivative of the outer function \(f\) leaving the inner function \({\color{maroon} g}\) the same, and then multiply by the derivative of the inner function \({\color{maroon} g'}.\)
Examples
Note that the chain rule can be applied iteratively, to a composite of three or more functions, like un-nesting a set of matryoshka dolls. \[ \biggl(f\Bigl({\color{maroon} g\bigl(}{\color{blueviolet} h(x)}{\color{maroon}\bigr)}\Bigr)\biggr)' = f'\Bigl({\color{maroon} g\bigl(}{\color{blueviolet} h(x)}{\color{maroon}\bigr)}\Bigr) {\color{maroon} g'\bigl(}{\color{blueviolet} h(x)}{\color{maroon}\bigr)} {\color{blueviolet} h'(x)} \]