Chain Rule of Derivatives – Formula and Examples

The Chain Rule is one of the most common derivatives applied in Differential Calculus (or Calculus I). It is used in deriving a composition of functions. The chain rule can be proven using the backbone of Calculus, which is the limits. 

In this article, we will discuss everything about the chain rule. We will cover its definition, formula, and application usage. We will also look at some examples and practice problems to apply the principles of the chain rule.

CALCULUS
Formula for the chain rule of derivatives

Relevant for

Learning about the chain rule with examples.

See formula

CALCULUS
Formula for the chain rule of derivatives

Relevant for

Learning about the chain rule with examples.

See formula

The chain rule and its formula

What is the chain rule of derivatives?

The chain rule is defined as the derivative of a composition of at least two different types of functions, such as:

$$y’ = \frac{d}{dx}[f \left( g(x) \right)]$$

where g(x) is a domain of the function f(u).

We can also call the function f as the external function and the function g as the internal function. In this composition, f(x) and g(x) must be two different types of functions that cannot be evaluated algebraically as a single type of function.

Recall that a function composition can be considered as a function within a function, or as a function of another function.

The formula for the chain rule of derivatives

The chain rule formula can be expressed verbally as the derivative of the outer function f multiplied by the derivative of the inner function g. The inner function g is the domain of the derivative of the outer function f.

The chain rule formula can be illustrated as:

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

where we derive f(g(x)) using the derivative method of the function f and using g(x) as the domain of the function f and then multiplying the derivative of the function f by the derivative of g(x).

In another form, it can also be illustrated as:

$$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$$

where

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

For more information on proving the chain rule using limits, visit our article on Proofs of the chain rule.


How to use the chain rule, a step-by-step tutorial

Suppose we have to derive

$latex H(x) = \sin{(x^3)}$

As you can see, this given function can be considered a composite function. Therefore, we can use the chain rule formula to derive this problem.

1. Write the formula for the chain rule as reference:

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

You can use any form of the chain rule formula.

2. Identify the inner and outer functions.

If we consider the inner function as $latex g(x) = u=x^3$, then

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

$latex f(u) = \sin{(u)}$

3. Apply the formula for the chain rule.

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

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

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

4. Substitute the inner function $latex g(x)=u=x^3$ into the derivative equation:

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

5. Simplify the obtained derivative:

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

$latex H'(x) = 3x^2 \cos{(x^3)}$


Chain rule – Examples with answers

EXAMPLE 1

Derive the following function:

$latex H(x) = (12x+6)^{24}$

Step 1: Write the formula for the chain rule as a reference:

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

Step 2: Recognizing the two functions, we have

If $latex g(x) = u=12x+6$, then

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

$latex f(u) = u^{24}$

Step 3: Let us now apply the formula for the chain rule:

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

$$\frac{d}{dx} H(x) = \frac{d}{du}(u^{24}) \cdot \frac{d}{dx}(12x+6)$$

$$\frac{d}{dx} H(x) = (24u^{23}) \cdot (12)$$

Step 4: Substitute the inner function $latex g(x)$ into the derivative equation:

$$\frac{d}{dx} H(x) = (24(12x+6)^{23}) \cdot (12)$$

Step 5: Simplify algebraically:

$$\frac{d}{dx} H(x) = 288 \cdot (12x+6)^{23}$$

$latex H'(x) = 288(12x+6)^{23}$

EXAMPLE 2

Find the derivative of the given function.

$latex f(x) = \sqrt[12]{6x-3}$

Step 1: Lists the chain rule formula for reference.:

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

Step 2: If $latex g(x) = u=6x-3$, then

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

$latex f(u) = \sqrt[12]{u}$

$latex f(u) = u^{\frac{1}{12}}$

Step 3: Let us now apply the chain rule formula:

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

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

$$\frac{d}{dx} H(x) = \left(\frac{1}{12}u^{-\frac{11}{12}} \right) \cdot (6)$$

Step 4: Substitute the inner function $latex g(x)=u=6x-3$ in the equation:

$$\frac{d}{dx} H(x) = \left(\frac{1}{12} \cdot (6x-3)^{-\frac{11}{12}} \right) \cdot (6)$$

Step 5: Simplify algebraically:

$$\frac{d}{dx} H(x) = \frac{6}{12 \cdot (6x-3)^{\frac{11}{12}}}$$

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

$$H'(x) = \frac{1}{2 \sqrt[12]{(6x-3)^{11}}}$$
en forma radical

EXAMPLE 3

Derive the following function:

$latex \cos{(12x^2+6x-3)}$

Step 1: We start with the chain rule formula:

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

Step 2: In this example, we have $latex g(x) = u=12x^2+6x-3$, then

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

$latex f(u) = \cos{(u)}$

Step 3: Let us now apply the formula for the chain rule:

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

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

$$\frac{d}{dx} H(x) = (-\sin{(u)}) \cdot (24x+6)$$

Step 4: Substitute the inner function $latex g(x)=u$ in the equation:

$$\frac{d}{dx} H(x) = (-\sin{(12x^2+6x-3)}) \cdot (24x+6)$$

Step 5: Simplify algebraically:

$$\frac{d}{dx} H(x) = -(24+6) \cdot \sin{(12x^2+6x-3)}$$

$$H'(x) = – (24 + 6) \sin{(12x^2+6x-3)}$$

EXAMPLE 4

What is the derivative of the given function?

$latex \csc{\ln{(12x+6)}}$

Step 1: The formula for the chain rule is:

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

Step 2: Identify how many functions you have in the problem. In this example, there are three. By separating these three functions, we have

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

$latex f(g(h(x))) = f(u)$
$latex f(u) = \csc{(u)}$

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

$latex g(h(x)) = g(v)$
$latex g(v) = \ln{(v)}$

$latex v = h(x) = 12x+6$

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

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

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

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

Step 3: Let us now apply the formula of the chain rule:

$$f_{1…n}'(x) = f_1′ \left( f_{2…n}(x) \right) \cdot f_2′ \left( f_{3…n}(x) \right)\cdots f_{n-1}’ \left(f_{n…n}(x)\right) \cdot f_n'(x)$$

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

$$\frac{d}{dx} H(x) = \frac{d}{du}(\csc{(u)}) \cdot \frac{d}{dv}(\ln{(v)}) \cdot \frac{d}{dx}(12x+6)$$

$$\frac{d}{dx} H(x) = (-\csc{(u)} \cot{(u)}) \cdot (\frac{1}{v}) \cdot {12}$$

Step 4: Substitute $latex g(h(x))$ and $latex h(x)$ in $latex u$ and $latex v$:

$$\frac{d}{dx} H(x) = (-\csc{(\ln{(12x+6)})} \cot{(\ln{(12x+6)})})\cdot (\frac{1}{12x+6}) \cdot {12}$$

Step 5: Simplify:

$$\frac{d}{dx} H(x) = \frac{-12 \csc{(\ln{(12x+6)})} \cot{(\ln{(12x+6)})}}{12x+6}$$

$$\frac{d}{dx} H(x) = \frac{-12 \csc{(\ln{(12x+6)})} \cot{(\ln{(12x+6)})}}{6(x+2)}$$

$$\frac{d}{dx} H(x) = \frac{-2 \csc{(\ln{(12x+6)})} \cot{(\ln{(12x+6)})}}{(x+2)}$$

$$H'(x) = -\frac{2 \csc{(\ln{(12x+6)})} \cot{(\ln{(12x+6)})}}{(x+2)}$$

EXAMPLE 5

Derive the following:

$latex e^{\sin^{2}{(6x-3)}}$

Step 1: Write the formula for the chain rule as a reference:

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

Step 2: Identify how many functions you have in the problem. In this example, there are four. By listing these four functions, we have

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

$latex f(g(h(j(x)))) = f(u)$
$latex f(u) = e^u$

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

$latex g(h(j(x))) = g(v)$
$latex g(v) = v^2$

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

$latex h(j(x)) = h(w)$
$latex h(w) = \sin{(w)}$

$latex w = j(x) = 6x-3$

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)]$$

Step 3: Let us now apply the formula of the chain rule:

$$f_{1…n}'(x) = f_1′ \left( f_{2…n}(x) \right) \cdot f_2′ \left( f_{3…n}(x) \right)\cdots f_{n-1}’ \left(f_{n…n}(x)\right) \cdot f_n'(x)$$

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

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

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

Step 4: Substitute $latex g(h(j(x)))$, $latex h(j(x))$, and $latex j(x)$ in $latex u$, $latex v$, and $latex w$:

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

Step 5: Simplify:

$$\frac{d}{dx} H(x) = 12 \cdot \sin{(6x-3)} \cdot \cos{(6x-3)} \cdot e^{\sin^{2}{(6x-3)}}$$

$$H'(x) = 12 \sin{(6x-3)} \cos{(6x-3)} e^{\sin^{2}{(6x-3)}}$$


Chain rule of derivatives – Practice problems

Chain rule of derivatives quiz
Logo
You have completed the quiz!

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

Write the answer in the input box.

$latex f'(x)=$

See also

Interested in learning more about the chain rule? Check out these pages:

Profile picture for author Jefferson Huera Guzman

Jefferson Huera Guzman

Jefferson is the lead author and administrator of Neurochispas.com. The interactive Mathematics and Physics content that I have created has helped many students.

Learn mathematics with our additional resources in different topics

LEARN MORE