The chain rule of differentiation of functions in calculus is
presented along with several examples and detailed solutions and comments. exercises with answers are also included.

Chain Rule of Differentiation

Let \[ f(x) = (g_{\circ} h)(x) = g(h(x) ) \]
be the composition of two functions.
Let \( u = h(x) \). Using the above, function \( f \) may be written as:
\[ f(x) = g(u)\]
the derivative \( f' \) of \( f \) with respect to \( x \) is given by the chain rule of differentiation [1] :
\[ \boxed { f'(x) = \dfrac{df}{du} \dfrac{du}{dx} } \]

Examples Using the Chain Rule of Differentiation

We now present several examples of applications of the chain rule.

Example 1

Find the derivative \( f'(x) \) given
\[ f(x) = 4 \cos (5x - 2) \]

Solution to Example 1

Let \( u = 5x - 2 \) and \( f(u) = 4 \cos u \), hence
\[ \dfrac{du}{dx} = 5 \] and \[ \dfrac{df}{du} = - 4 \sin u \]
We now use the chain rule
\[ f '(x) = \dfrac{df}{du} \dfrac{du}{dx} \\ = - 4 \sin (u) \cdot 5\]
We now substitute \( u = 5x - 2\) in \( \sin (u) \) above to obtain
\[ \boxed{ f '(x) = - 20 \sin (5x - 2) } \]

Example 2

Find the derivative \( f '(x) \) given
\[ f(x) = (x^3 - 4x + 5)^4 \]

Solution to Example 2

Let \( u = x^3 - 4x + 5\) and \( f(u) = u^4 \) which give
\[ \dfrac{du}{dx} = 3 x^2 - 4 \] and \[ \dfrac{df}{du} = 4 u^3 \]
Use of the chain rule
\[ f '(x) = \dfrac{df}{du} \dfrac{du}{dx} \\
= (4 u^3) (3 x^2 - 4) \]
We now substitute \( u = x^3 - 4x + 5 \) above to obtain
\[ \boxed{ f '(x) = 4 (x^3 - 4x + 5)^3 (3 x^2 - 4) } \]

Example 3

Find \( f '(x) \) given
\[ f(x) = \sqrt {x^2 + 2x -1} \]

Solution to Example 3

Let \( u = x^2 + 2x -1 \) and \( f(u) = \sqrt u \) which give
\[ \dfrac{du}{dx} = 2x + 2 \] and \[ \dfrac{df}{du} = \dfrac{1}{2 \sqrt u} \]
Use the chain rule we obtain
\[ f '(x) = \dfrac{df}{du} \dfrac{du}{dx} = \dfrac{1}{ 2 \sqrt u} (2x+2) \]
Substitute \( u = x^2 + 2x -1 \) above to obtain
\[ f '(x) = \dfrac{2x + 2}{2 \sqrt{x^2 + 2x -1}} \]
Factor 2 in numerator and denominator and simplify
\[ \boxed{ f '(x) = \dfrac{x + 1}{ \sqrt{x^2 + 2x -1}}} \]

Example 4

Find the first derivative of \( f \) given
\[ f(x) = \sin ^2 (2x + 3) \]

Solution to Example 4

Let \( u = \sin (2x + 3) \) and \( f(u) = u^2 \) which give
\[ \dfrac{du}{dx} = 2 \cos(2x + 3) \] and \[ \dfrac{df}{du} = 2 u \]
The use of the chain rule leads to
\[ f '(x) = \dfrac{df}{du} \dfrac{du}{dx} = 2 u \cdot 2 \cos(2x + 3) \]
Substitute \( u = \sin (2x + 3) \) above to obtain
\[ f '(x) = 4 \sin (2x + 3) \cos (2x + 3) \]
Use the trigonometric identity \( \sin (2x) = 2 \sin x \cos x \) to simplify \( f '(x) \)
\[ \boxed{ f '(x) = 2 \sin (4x + 6) } \]

Example 5

Find the first derivative of \( f \) given
\[ f(x) = \ln(x^2 + x) \]

Solution to Example 5

Let \( u = x^2 + x \) and \( f(u) = \ln u \) , hence
\[ \dfrac{du}{dx} = 2 x + 1 \] and \[ \dfrac{df}{du} = \dfrac{1}{u} \]
Use the chain rule and substitute
\[ f '(x) = \dfrac{df}{du} \dfrac{du}{dx} = \dfrac{1}{u} (2 x + 1) \]
Substitute back \( u = x^2 + x \)
\[ \boxed{ f'(x) = \dfrac{2 x + 1}{x^2 + x} } \]

Exercises On Chain Rule of Differentiation

Use the chain rule to find the first derivative to each of the functions.