With the chain rule we can determine the derivative of a composite function using the derivatives of the function from which it is composed.
For two functions #\blue{f(x)}# and #\green{g(x)}# holds \[
(\blue f \circ \green{g})'(x)=\blue f'(\green{g(x)}) \cdot \green{g'(x)}\]
Example
\[\frac{\dd}{\dd x} \blue ( \green{x^2-5x}\blue{)^4}=4 \cdot (\green{x^2-5x})^3 \cdot (2x-5)
\]
The chain rule states that the derivative of a composite function #\blue f(\green{g(x)})# is equal to the derivative of the outer link #\blue f# with the inner link #\green g# inserted multiplied with the derivative of the inner link #\green g#.
We call this a chain, because we can also consider a composite function as a chain function consisting of two links.
When applying the chain rule, it is important to first determine of which two functions #\blue{f(x)}# and #\green{g(x)}# the function is composed. In some cases there are multiple options possible. It is then important to choose these functions in such a way that both the derivative of #\blue{f(x)}# and the derivative of #\green{g(x)}# can be determined.
In the example the derivative of #(\blue f \circ \green g)(x)=\blue ( \green{x^2-5x}\blue{)^4}# is determined. To do this, we first need to determine what the functions #\blue{f(x)}# and #\green{g(x)}# are.
In this case these functions are #\blue{f(x)}=\blue{x^4}# and #\green{g(x)}=\green{x^2-5x}#.
The derivatives of these functions are #f'(x)=4x^3# and #g'(x)=2x-5# respectively.
We can now find the derivative of #(\blue f \circ \green g)(x)=\blue ( \green{x^2-5x}\blue{)^4}# using these derivatives and the chain rule, as is done in the example.
A different notation for the chain rule is
\[\frac{\dd }{\dd x}\blue f(\green{g(x)})=\left.\frac{\dd }{\dd x}\blue{f(x)}\right|_{\green{g(x)}}\cdot \frac{\dd }{\dd x}\green{g(x)}\]Here #\left.\frac{\dd }{\dd x}f(x)\right|_{a}# is used to represent #f'(a)#, the derivative of #f(x)# at the point #a#.
Example
The function #\blue f(\green{g(x)})= \left(\frac{3}{x} +1\right)^2# is composed of #\blue{f(x)}=\blue{x^2}# and #\green{g(x)}=\green{\frac{3}{x}+1}#. Then #\blue f(\green{g(x)})= \left(\frac{3}{x}+1\right)^2# and thus:\[\begin{array}{rcl}\dfrac{\dd}{\dd x}\left(\dfrac{3}{x}+1\right)^2&=&\left.\dfrac{\dd }{\dd x}\blue{x^2}\right|_{\green{\frac{3}{x}+1}}\cdot \dfrac{\dd }{\dd x}\left( \green{\dfrac{3}{x}+1} \right)\\&=& 2 \cdot \left( \green{\dfrac{3}{x} +1} \right) \cdot -\dfrac{3}{x^2} \\ &=& -\dfrac{18}{x^3} - \dfrac{6}{x^2}\end{array}\]
The chain rule uses the derivative of #\green g# in #x# and the derivative of #\blue f# in #\green{g(x)}#. Both of these derivatives must exist to make the rule valid.
Let #\blue{f}# and #\green{g}# be two functions, where #\green g# is differentiable and #\blue f# is differentiable on the range of #f#. Let #x# be a point in the domain of #\green g#.
To prove the chain rule, we will first define a new function \[a(z)=\left\{\begin{array}{ll}\dfrac{\blue{f}(\green{g(x)}+z)-\blue f(\green{g(x)})}{z}-\blue f'(\green{g(x)}) & \text{if } z \ne 0 \\ 0 & \text{if } z=0\end{array}\right.\]
Because of the definition of the derivative the following applies \[\lim_{z \to 0}a(z)=\blue f'(\green{g(x)})-\blue f'(\green{g(x)})=0\]
This means that #a(z)# is continuous in #z=0#. This will be used later on in this proof.
The definition of #a(z)# for #z\ne 0# can be rewritten by adding #\blue f'(\green{g(x)}) # to both sides and multiplying both sides with #z#. This gives:
\[\blue{f}(\green{g(x)}+z)-\blue f(\green{g(x)})=\left(\blue f'(\green{g(x)}+a(z)\right) \cdot z\]
We will now substitute #z=\green{g(x+h)}-\green{g(x)}#. This gives:
\[\blue{f}(\green{g(x)}-(\green{g(x+h)}-\green{g(x)}))-\blue f(\green{g(x)})=\left(\blue f'(\green{g(x)}+a(\green{g(x+h)}-\green{g(x)})\right) \cdot \left(\green{g(x+h)}-\green{g(x)}\right)\]
This can be simplified to
\[\blue{f}(\green{g(x+h)})-\blue f(\green{g(x)})=\left(\blue f'(\green{g(x)}+a(\green{g(x+h)}-\green{g(x)})\right) \cdot \left(\green{g(x+h)}-\green{g(x)}\right)\]
In the above expression we want to let #h# go to #0#. Therefore we will now determine #\lim_{h \to 0} a(\green{g(x+h)}-\green{g(x)})#.
Because differentiable functions are always continuous, it holds that #\lim_{h \to 0}(\green{g(x+h)}-\green{g(x)})=0#.
Earlier we showed that #a(z)# is continuous in #z=0#, therefore we can now use the calculation rule for composition of limits. This gives:
\[\lim_{h \to 0}a(\green{g(x+h)}-\green{g(x)})=\lim_{z \to 0} a(z)=0\]
Now we can determine the derivative of #\blue f(\green{g(x)})#.
\[\begin{array}{rcl}\dfrac{\dd }{\dd x}(\blue f(\green{g(x)}))&=& \displaystyle\lim_{h \to 0} \dfrac{\blue f(\green{g(x+h)})-\blue f(\green{g(x)})}{h}
\\&&\quad \blue{\text{definition of derivative}}\\
&=& \displaystyle \lim_{h \to 0} \dfrac{\green{g(x+h)}-\green{g(x)}}{h} \cdot \left(\blue f'(\green{g(x)})+a(\green{g(x+h)}-\green{g(x)})\right)
\\&&\quad \blue{\text{earlier derivation used}}\\
&=& \displaystyle \lim_{h \to 0} \dfrac{\green{g(x+h)}-\green{g(x)}}{h} \cdot \lim_{h\to 0} \left(\blue f'(\green{g(x)})+a(\green{g(x+h)}-\green{g(x)})\right)
\\&&\quad \blue{\text{limits split as both exist}}\\
&=& \green{g'(x)} \cdot \left(\blue f'(\green{g(x)}+0\right)
\\&&\quad \blue{\text{limits determined}}\\
&=& \green{g'(x)} \cdot \blue f'(\green{g(x)})
\\&&\quad \blue{\text{calculated}}\end{array}\]
With this the chain rule is proven.
Determine the derivative of the function #\left(7\cdot x^2-1\right)^{{{3}\over{2}}}#.
#\frac{\dd}{\dd x}\left (\left(7\cdot x^2-1\right)^{{{3}\over{2}}}\right)=# \(21\cdot x\cdot \sqrt{7\cdot x^2-1}\)
We can calculate #\dfrac{\dd}{\dd x}\left(\left(7\cdot x^2-1\right)^{{{3}\over{2}}}\right)# by using the chain rule. Write #(f\circ g)(x)=\left(7\cdot x^2-1\right)^{{{3}\over{2}}}# with #f(x)=x^{{{3}\over{2}}}# and #g(x)=7\cdot x^2-1#. Now e can apply the chain rule which states: #(f\circ g)'(x)=f'(g(x)) \cdot g'(x)#.
\[\begin{array}{rcl}\displaystyle \dfrac{\dd}{\dd x} \left(\left(7\cdot x^2-1\right)^{{{3}\over{2}}}\right) &=& \displaystyle {{3\cdot \sqrt{g(x)}}\over{2}} \cdot \frac{\dd }{\dd x}\left(g(x)\right) \\
&&\phantom{xxx}\blue{\text{chain rule applied with }f'(x)={{3\cdot \sqrt{x}}\over{2}}}\\
&=&\displaystyle \left({{3\cdot \sqrt{7\cdot x^2-1}}\over{2}}\right)\cdot \frac{\dd }{\dd x}\left(7\cdot x^2-1\right) \\
&&\phantom{xxx}\blue{g(x)=7\cdot x^2-1 \text{ substituted}}\\
&=&\displaystyle \left({{3\cdot \sqrt{7\cdot x^2-1}}\over{2}}\right)\cdot\left( 14\cdot x\right) \\
&&\phantom{xxx}\blue{\frac{\dd }{\dd x}\left(7\cdot x^2-1\right) \text{calculated}}\\
&=&\displaystyle 21\cdot x\cdot \sqrt{7\cdot x^2-1}\\
&&\phantom{xxx}\blue{\text{simplified}}
\end{array}\]