Chain Rule – Examples and Practice Problems

Derivation problems that involve the composition of functions can be solved using the chain rule formula. This formula allows us to derive a composition of functions such as but not limited to f(g(x)).

Here, we will look at a summary of the chain rule. Additionally, we will explore several examples with answers to understand the application of the chain rule formula.

CALCULUS
Chain rule formulas

Relevant for

Exploring examples with answers of the chain rule.

See examples

CALCULUS
Chain rule formulas

Relevant for

Exploring examples with answers of the chain rule.

See examples

Summary of The Chain Rule

The chain rule is a very helpful tool used to derive a composition of different functions. It is a rule that states that the derivative of a composition of at least two different types of functions is equal to the derivative of the outer function f(u) multiplied by the derivative of the inner function g(x), where u = g(x) as a domain of f(u).

This gives us the chain rule formula as:

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{x}(g(x))$$

or in a another form, it can be illustrated as:

$$\frac{d}{dx} \left(f(g(x)) \right)’ = \frac{d}{du}(f(u)) \cdot \frac{d}{dx}(g(x))$$

where

  • $latex f(u) =$ the outer function 
  • $latex u = g(x)$, the domain of outer function $latex f(u)$
  • $latex \frac{d}{du}(f(u)) =$ the derivative of the outer function $latex f(u)$ in terms of $latex u$
  • $latex \frac{d}{dx}(g(x)) =$ the derivative of inner function $latex g(x)$ in terms of $latex x$

We use this formula to derive functions that have the following forms:

$latex H(x) = f(g(x))$


Chain Rule – Examples with Answers

Using the formula detailed above, we can derive various functions that are written as compositions. Each of the following examples has its respective detailed solution. It is recommended for you to try to solve the sample problems yourself before looking at the solution.

EXAMPLE 1

Find the derivative of $latex H(x) = (x^3 – 3x^2 + 2x)^5$.

The first thing we need to do is to list down the chain rule formula for our reference:

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

If you are a beginner, it is recommended that you identify the functions involved in the composition. Otherwise, you can directly use the chain rule formula with fewer steps as long as you know the derivative methods of the type of functions involved.

Assuming you are a beginner, let us identify the functions involved from the function composition:

The given is

$latex H(x) = (x^3 – 3x^2 + 2x)^5$

From the given, we have

If $latex g(x) = u$, then

$latex f(g(x)) = f(u)$
$latex f(u) = u^5$
∴ $latex f(u)$ is a power function and will use the power formula to be derived

$latex u = g(x) = x^3 – 3x^2 + 2x$
∴ $latex g(x)$ is an polynomial function and will use the sum/difference of derivatives to be derived

If $latex f(g(x)) = f(u)$, then

$$\frac{d}{dx} [f(g(x))] = \frac{d}{du} [f(u)]$$

Applying the chain rule formula, we have:

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(f(u)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(u^5) \right) \cdot \frac{d}{dx}(x^3 – 3x^2 + 2x)$$

$$\frac{d}{dx} (H(x)) = (5u^4) \cdot (3x^2-6x+2)$$

Since $latex u = g(x)$, let’s substitute $latex g(x)$ into $latex u$:

$$\frac{d}{dx} (H(x)) = [5 \cdot (x^3 – 3x^2 + 2x)^4]\cdot (3x^2-6x+2)$$

Simplifying algebraically, we have

$$H'(x) = (5x^3-15x^2+10x)^4 \cdot (3x^2-6x+2)$$

And the final answer is:

$$H'(x) = (5x^3-15x^2+10x)^4 (3x^2-6x+2)$$

EXAMPLE 2

Find the derivative of $latex H(x) = \sqrt[3]{x^3 – 3x^2 + 2x}$.

Let us first list down the chain rule formula for our reference:

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

Let’s identify the functions involved from the function composition:

The given is

$$H(x) = \sqrt[3]{x^3 – 3x^2 + 2x}$$

Since this is a radical function, it is always recommended to rewrite it from radical to exponent form to be derivable. Rewriting, we have

$$H(x) = (x^3 – 3x^2 + 2x)^{\frac{1}{3}}$$

From the given, we have

If $latex g(x) = u$, then

$latex f(g(x)) = f(u)$
$latex f(u) = u^{\frac{1}{3}}$
∴ $latex f(u)$ is a power function and will use the power formula to be derived

$latex u = g(x) = x^3 – 3x^2 + 2x$
∴ $latex g(x)$ is an polynomial function and will use the sum/difference of derivatives to be derived

If $latex f(g(x)) = f(u)$, then

$$\frac{d}{dx} [f(g(x))] = \frac{d}{du} [f(u)]$$

Applying the chain rule formula, we have:

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(f(u)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(u^{\frac{1}{3}}) \right) \cdot \frac{d}{dx}(x^3 – 3x^2 + 2x)$$

$$\frac{d}{dx} (H(x)) = (\frac{1}{3} u^{-\frac{2}{3}}) \cdot (3x^2-6x+2)$$

Since $latex u = g(x)$, let’s substitute $latex g(x)$ into $latex u$:

$$\frac{d}{dx} (H(x)) = [(\frac{1}{3} \cdot (x^3 – 3x^2 + 2x)^{-\frac{2}{3}})]$ $latex \cdot (3x^2-6x+2)$$

Simplifying algebraically, we have

$$H'(x) = \frac{1}{3 \cdot (x^3 – 3x^2 + 2x)^{\frac{2}{3}}} \cdot (3x^2-6x+2)$$

$$H'(x) = \frac{3x^2-6x+2}{3 \cdot (x^3 – 3x^2 + 2x)^{\frac{2}{3}}}$$

And the final answer is:

$$H'(x) = \frac{3x^2-6x+2}{3 \sqrt[3]{(x^3 – 3x^2 + 2x)^2}}$$
in radical form

EXAMPLE 3

Find the derivative of $latex H(x) = \cos{(x^3-9)}$.

If $latex g(x) = u$, then

$latex f(g(x)) = f(u)$
$latex f(u) = \cos{(x^3-9)}$
∴ $latex f(u)$ is a trigonometric function and will use the derivative of trigonometric functions to be derived

$latex u = g(x) = x^3 – 9$
∴ $latex g(x)$ is an polynomial function and will use the sum/difference of derivatives to be derived

If $latex f(g(x)) = f(u)$, then

$$\frac{d}{dx} [f(g(x))] = \frac{d}{du} [f(u)]$$

Applying the chain rule formula, we have:

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(f(u)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(\cos{(u)}) \right) \cdot \frac{d}{dx}(x^3 – 9)$$

$$\frac{d}{dx} (H(x)) = (-\sin{(u)}) \cdot (3x^2)$$

Since $latex u = g(x)$, let’s substitute $latex g(x)$ into $latex u$:

$$\frac{d}{dx} (H(x)) = (-\sin{(x^3-9)}) \cdot (3x^2)$$

Simplifying algebraically, we have

$$H'(x) = -3x^2 \cdot \sin{(x^3-9)}$$

And the final answer is:

$latex H'(x) = -3x^2 \sin{(x^3-9)}$

EXAMPLE 4

Find the the derivative of $latex \sec^{5}{x}$

If $latex g(x) = u$, then

$latex f(g(x)) = f(u)$
$latex f(u) = u^5$
∴ $latex f(u)$ is a power function and will use the power formula to be derived

$latex u = g(x) = \sec{(x)}$
∴ $latex g(x)$ is a trigonometric function and will use the derivative of trigonometric functions to be derived

If $latex f(g(x)) = f(u)$, then

$$\frac{d}{dx} [f(g(x))] = \frac{d}{du} [f(u)]$$

Applying the chain rule formula, we have:

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(f(u)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(u^5 \right) \cdot \frac{d}{dx}(\sec{(x)})$$

$$\frac{d}{dx} (H(x)) = (5u^4) \cdot (\sec{(x)} \tan{(x)})$$

Since $latex u = g(x)$, let’s substitute $latex g(x)$ into $latex u$:

$$\frac{d}{dx} (H(x)) = [5(\sec{(x)})^4] \cdot (\sec{(x)} \tan(x))$$

Simplifying algebraically, we have

$$H'(x) = 5 \cdot \sec{(x)} \cdot \sec^{4}{(x)} \cdot \tan(x)$$

$$H'(x) = 5 \cdot \tan(x) \cdot \sec^{5}{(x)}$$

And the final answer is:

$latex H'(x) = 5 \tan{(x)} \sec^{5}{(x)}$

EXAMPLE 5

Find the derivative of $latex F(x) = \log_{7}{(x^3+e^x)}$.

If $latex g(x) = u$, then

$latex f(g(x)) = f(u)$
$latex f(u) = \log_{7}{u}$
∴ $latex f(u)$ is a logarithmic function and will use the derivative of logarithmic functions to be derived

$latex u = g(x) = x^3+e^x$
∴ $latex g(x)$ is a sum of power and exponential functions and will use the sum/difference of derivatives to be derived

If $latex f(g(x)) = f(u)$, then

$$\frac{d}{dx} [f(g(x))] = \frac{d}{du} [f(u)]$$

Applying the chain rule formula, we have:

$$\frac{d}{dx} (F(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (F(x)) = \frac{d}{du} \left(f(u)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (F(x)) = \frac{d}{du} \left(\log_{7}{u} \right) \cdot \frac{d}{dx}(x^3+e^x)$$

$$\frac{d}{dx} (F(x)) = \left(\frac{1}{u \ln{(7)}} \right) \cdot (3x^2+e^x)$$

Since $latex u = g(x)$, let’s substitute $latex g(x)$ into $latex u$:

$$\frac{d}{dx} (F(x)) = \left(\frac{1}{(x^3+e^x) \ln{(7)}} \right) \cdot (3x^2+e^x)$$

Simplifying algebraically, we have

$$\frac{d}{dx} (F(x)) = \left(\frac{1}{(x^3+e^x) \ln{(7)}} \right) \cdot (3x^2+e^x)$$

$$\frac{d}{dx} (F(x)) = \left(\frac{3x^2+e^x}{(x^3+e^x) \ln{(7)}} \right)$$

And the final answer is:

$$F'(x) = \left(\frac{3x^2+e^x}{(x^3+e^x) \ln{(7)}} \right)$$

EXAMPLE 6

Find the derivative of $latex F(x) = \cot^{-1}{\left(\frac{x-1}{x+2} \right)}$.

If $latex g(x) = u$, then

$latex f(g(x)) = f(u)$
$latex f(u) = \cot^{-1}{(u)}$
∴ $latex f(u)$ is an inverse trigonometric function and will use the derivative of inverse trigonometric functions to be derived

$latex u = g(x) = \frac{x-1}{x+2}$
∴ $latex g(x)$ is a rational function and will use the quotient rule to be derived

If $latex f(g(x)) = f(u)$, then

$latex \frac{d}{dx} [f(g(x))] = \frac{d}{du} [f(u)]$

Applying the chain rule formula, we have:

$$\frac{d}{dx} (F(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{dx}(g(x))$$

$$\frac{d}{dx} (F(x)) = \frac{d}{du} \left(f(u)) \right) \cdot \frac{d}{dx}(g(x))$$

$$ \frac{d}{dx} (F(x)) = \frac{d}{du} \left(\cot^{-1}{(u)} \right) \cdot \frac{d}{dx} \left(\frac{x-1}{x+2} \right)$$

$$ \frac{d}{dx} (F(x)) = \left(-\frac{1}{u^2+1} \right) \cdot \left(\frac{2}{(x+1)^2} \right)$$

Since $latex u = g(x)$, let’s substitute $latex g(x)$ into $latex u$:

$$\frac{d}{dx} (F(x)) = \left(-\frac{1}{ \left(\frac{x-1}{x+1} \right)^2+1} \right) \cdot \left(\frac{2}{(x+1)^2} \right)$$

Simplifying algebraically, we have

$$\frac{d}{dx} (F(x)) = -\frac{2}{\left(\left(\frac{x-1}{x+1} \right)^2+1 \right) \cdot (x+1)^2}$$

$$\frac{d}{dx} (F(x)) = -\frac{1}{x^2+1}$$

And the final answer is:

$$F'(x) = -\frac{1}{x^2+1}$$

EXAMPLE 7

Find the derivative of $latex f(x) = \tan^{2}{(e^{3x})}$ 

This is a more complex case as the function $latex H(x)$ is a composition of four functions. From the given, we have

If $latex f(g(h(j(x)))) = u$, then

$latex f(g(h(j(x)))) = f(u)$
$latex f(u) = u^2$
∴ $latex f(u)$ is a power function and will use power formula to be derived

If $latex g(h(j(x))) = v$, then

$latex g(h(j(x))) = g(v)$
$latex g(v) = \tan{(v)}$
∴ $latex g(v)$ is a trigonometric function and will use the derivative of trigonometric functions to be derived

If $latex h(j(x)) = w$, then

$latex h(j(x)) = h(w)$
$latex h(w) = e^w$
∴ $latex h(w)$ is a exponential function and will use the derivative of exponential functions to be derived

$latex w = j(x) = 3x$
∴ $latex j(x)$ is a monomial function and will use power formula to be derived

If $latex f(g(h(j(x)))) = f(u)$, then

$$\frac{d}{dx} [f(g(h(j(x))))] = \frac{d}{du} [f(u)]$$

If $latex g(h(j(x))) = g(v)$, then

$$\frac{d}{dx} [g(h(j(x)))] = \frac{d}{dv} [g(v)]$$

If $latex h(j(x)) = h(w)$, then

$$\frac{d}{dx} [h(j(x))] = \frac{d}{dw} [h(w)]$$

Adjusting our chain rule formula for the derivative of compositions of four functions, we have

$$\frac{d}{dx} (H(x)) = \frac{d}{dx} \left(f(g(h(j(x)))) \right)\cdot \frac{d}{dx} \left(g(h(j(x))) \right) \cdot \left(h(j(x)) \right) \cdot \frac{d}{dx}(j(x))$$

$$\frac{d}{dx} (H(x)) = \frac{d}{du} \left(f(u)) \right) \cdot \frac{d}{dv} \left(g(v)) \right) \cdot \frac{d}{dw} \left(h(w)) \right) \cdot \frac{d}{dx}(j(x))$$

Applying our adjusted chain rule formula for the derivative of composition of four functions, we have

$$\frac{d}{dx} (H(x)) = \frac{d}{du} (u^2) \cdot \frac{d}{dv} (\tan{(v)}) \cdot \frac{d}{dw} (e^w) \cdot \frac{d}{dx}(3x)$$

$$\frac{d}{dx} (H(x)) = (2u) \cdot (\sec^{2}{(v)}) \cdot (e^w) \cdot (3)$$

Since $latex u = g(h(j(x)))$, $latex v = h(j(x))$ and $latex w = j(x)$, let’s do the substitutions:

$$\frac{d}{dx} (H(x)) = (2(\tan{(e^{3x})})) \cdot (\sec^{2}{(e^{3x})}) \cdot (e^{3x}) \cdot (3)$$

Simplifying algebraically, we have

$$\frac{d}{dx} (H(x)) = 2 \cdot 3 \cdot e^{3x} \cdot \tan{(e^{3x})} \cdot \sec^{2}{(e^{3x})}$$

$$H'(x) = 6 \cdot (e^{3x}) \cdot \tan{(e^{3x})} \cdot \sec^{2}{(e^{3x})}$$

And the final answer is:

$$H'(x) = 6 \cdot (e^{3x}) \tan{(e^{3x})} \sec^{2}{(e^{3x})}$$

As you can observe from our solution in this problem, deriving compositions of four functions, you will realize why the chain rule is coined from the term “chain”.


Chain Rule – Practice problems

Solve the following derivation problems and test your knowledge on this topic. Use the chain rule formula detailed above to solve the exercises. If you have problems with these exercises, you can study the examples solved above.

Find the derivative of $latex f(x) = (x^5 + 4x^4 – 8x – 2)^6$

Choose an answer






What is the derivative of $latex f(x) = \ln{(x^5 + 4x^4 – 8x – 2)}$ ?

Choose an answer






Derive: $latex f(x) = \sec{\left((x^3 + 9)^3 \right)}$

Choose an answer






Differentiate $latex y = \tan^{-1}{(\sqrt[3]{x^3-9})}$

Choose an answer






Find the derivative of $latex y = \ln{\left(\frac{x^4-6}{\sin^{2}{(x)}} \right)}$

Choose an answer







See also

Interested in learning more about the chain rule? Take a look at these pages:

Learn mathematics with our additional resources in different topics

LEARN MORE