Differentiation, derivatives and Taylor approximations: Rules for differentiating functions

Theory The chain rule

First have a look at some examples.

  1. 1
  2. 1
Given are the functions \[\begin{aligned}f(x)&= x^{4}\\ \\ g(x)&=-3x+3\\ \\ s(x)&=f\bigl(g(x)\bigr)\\ &=\bigl(g(x)\bigr)^4\\ &=(-3x+3)^4\end{aligned}\] Calculate \[\begin{aligned}& f'(x)\\ \\ & g'(x)\\ \\ & s'(x)\quad (\text{first expand brackets in }s(x))\\ \\ & f'\bigl(g(x)\bigr)\cdot g'(x)\end{aligned}\]
Expansion of the composite function yields: \[\begin{aligned}s(x)&=(-3x+3)^4\\ &=81\,x^4-324\,x^3+486\,x^2-324\,x+81\end{aligned}\] So \[\begin{aligned}f'(x)&=4x^{3}\\ \\
g'(x)&= -3\\ \\
s'(x)&=324\,x^3-972\,x^2+972\,x-324\\ \\
f'\bigl(g(x)\bigr)\cdot g'(x)&= 4(-3x+3)^{3}\cdot (-3) \\
&= -12(-27\,x^3+81\,x^2-81\,x+27)\\
&=324\,x^3-972\,x^2+972\,x-324
\end{aligned}\] Note in this case: \[\Bigl(f\bigl(g(x)\bigr)\Bigr)'=f'\bigl(g(x)\bigr)\cdot g'(x)\]
New example

The pattern is clear and can be generalised to the chain rule of differentiation.

Chain Rule If \(f\) and \(g\) are functions such that \(g\) is differentiable at \(x\) and \(f\) is differentiable at \(g(x)\), then the composite function \((f\circ g)(x)=f\bigl(g(x)\bigr)\) is differentiable at \(x\), and \[(f\circ g)'(x)=\Bigl(f\bigl(g(x)\bigr)\Bigr)'= f'\bigl(g(x)\bigr)\cdot g'(x)\]

For math enthusiasts we present a proof of the chain rule, which is based on approaching tangent lines via lines between two points on the graph of the function that come sloser and closer to each other.

A function \(f\) is differentiable at \(x=a\) if there exists a function \(\varphi\) such that \(\varphi\) is continuous at \(x=a\) and \[f(x)-f(a)=\varphi(x)\cdot(x-a)\] for all \(x\) (at least in the neighbourhood of \(a\)). \(\varphi(x)\) is the slope of the line between the two points \(\bigl((a,f(a)\bigr)\) and \(\bigl((x,f(x)\bigr)\) from the definition of \(\varphi\) follows therefore that \(\lim_{x\to a}\varphi(x)=\varphi(a)=f'(a)\).

For the function \(g\) that is differentiable at \(x=b\) we can do the same, but then with a function \(\psi\) such that it is continuous at \(x=b\), \[g(x)-g(b)=\psi(x)\cdot(x-b)\] and \(\lim_{x\to b}\psi(x)=\psi(b)=g'(b)\).


Suppose now that \(a=g(b)\) and that \(f\) is differentiable at the point \(a\), then we have for all \(y\) in the neighbourhood of \(a\) \[f(y)-f(a)=\varphi(y)\cdot (y-a)\] with \(\varphi(a)=f'(a)\). In particular we have for \(y=g(x)\) that \[f(g(x))-f(g(b))=\varphi(g(x))\cdot \bigl(g(x)-g(b)\bigr)\] where \(\varphi\bigl(g(b)\bigr)=f'\bigl(g(b)\bigr)\). Then we have for the composite function \(h(x)=f\bigl(g(x)\bigr)\) with \(a=g(b)\) that \[\begin{aligned}h(x)-h(b)&=f\bigl(g(x)\bigr)-f\bigl(g(b)\bigr)&\\[0.25cm] &=\varphi(g(x))\cdot\bigl(g(x)-g(b)\bigr)& \text{with }\varphi\bigl(g(b)\bigr)=f'\bigl(g(b)\bigr)\\[0.25cm] &=\varphi(g(x))\cdot\psi(x)\cdot (x-b)& \text{with }\psi(b)=g'(b)\end{aligned}\] and \[\begin{aligned}\lim_{x\to b}\varphi\bigl(g(x)\bigr)\cdot\psi(x)&=\varphi\bigl(g(b)\bigr)\cdot \psi(b)\\[0.25cm] &=f'\bigl(g(b)\bigr)\cdot g'(b)\end{aligned}\] So: \[h'(b)=f'\bigl(g(b)\bigr)\cdot g'(b)\] If this is true for all \(b\) we get the chain rule for differentiable functions: \[(f\circ g)'(x)=\Bigl(f\bigl(g(x)\bigr)\Bigr)'= f'\bigl(g(x)\bigr)\cdot g'(x)\quad \text{wherever the derivatives exist.}\]

A particular case of application of the chain rule is the calculation of the derivative of a function after some linear transformation.

If \(s(x)=f(a\cdot x+b)\), then \(s'(x)= a\cdot f'(a\cdot x+b)\)

The first difficult aspect is the identification of the composition of functions. A convenient notation helps; look at two examples below.

The function \[h(x)=(3x^2-1)^5\] can be written as composition of two functions:

\(f(u)=u^5\) and \(u=3x^2-1\)

The derivatives of these functions are:

\(\displaystyle f'(u)=\frac{\dd f}{\dd u}=5u^4\) and \(\displaystyle u'(x)=\frac{\dd u}{\dd x}=6x\).

Recall that the notation \(\displaystyle \frac{\dd f}{\dd u}\) means that you differentiate \(f\) with respect to \(u\) and then optionally substitute \(u=3x^2-1\). The notation \(\displaystyle \frac{\dd u}{\dd x}\) means that you differentiate \(u\) with respect to \(x\). Then the chain rule leads to \[h'(x)=\frac{\dd\bigl(f(u(x)\bigr)}{\dd x}=\frac{\dd f}{\dd u}\cdot \frac{\dd u}{\dd x}=5(3x^2-1)^4\cdot 6x = 30x(3x^2-1)^4\]

The function \[h(t)=\sqrt{3t^2+4}\] can be written as composition of two functions:

\(f(u)=\sqrt{u}\) and \(u=3t^2+4\)

The derivatives of these functions are:

\(\displaystyle f'(u)=\frac{\dd f}{\dd u}=\bigl(\sqrt{u}\bigr)'=\bigl( u^{\frac{1}{2}}\bigr)'=\frac{1}{2}u^{-\frac{1}{2}}=\frac{1}{2\sqrt{u}}\) and \(\displaystyle u'(t)=\frac{\dd u}{\dd t}=6t\).

Then the chain rule leads to \[h'(t)=\frac{\dd f}{\dd u}\cdot \frac{\dd u}{\dd t}=\frac{1}{2\sqrt{3t^2+4}}\cdot 6t = \frac{3t}{\sqrt{3t^2+4}}\]

Via the chain rule you can also calculate the derivative of an inverse function when you know the derivative of the function itself.

Derivative of an inverse function For a differentiable function \(f\) with derivative \(f'\) and with corresponding inverse function \(f^{-1}\) we have: \[\frac{\dd f^{-1}}{\dd x}(x)=\frac{1}{f'\bigl(f^{-1}(x)\bigr)}\]

Because \[f\bigl(f^{-1}(x)\bigr)=x\] the chain rule leads to \[\frac{\dd f}{\dd x}\bigl(f^{-1}(x)\bigr)\cdot \frac{\dd f^{-1}}{\dd x}(x)=1\] Thus \[\frac{\dd f^{-1}}{\dd x}(x)=\frac{1}{f'\bigl(f^{-1}(x)\bigr)}\]
#\phantom{x}#

Mathcentre video

Chain Rule (24:35)

About us ⋅ Help ⋅ Privacy ⋅ Terms and conditions
Copyright © 2023 SOWISO