The Chain Rule is one of the major tools used in Differential Calculus (*or Calculus I*) derivation applications. It is very essential for the derivative of compositions of at least two different types of functions.

However, as easy as it seems to just use a standard formula to derive the composition of functions, it is significant to learn the concepts and foundations behind the creation of this standard formula that will satisfy the principles of the chain rule. Hence, in this chapter, we will focus mainly on the proofs of the chain rule formula.

## What is the Chain Rule?

The chain rule is defined as the derivative of the composition of at least two different types of functions. This rule can be used to derive a composition of functions such as but not limited to:

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

where *g(x) *is a domain of function *f*. In this composition, functions *f *and *g* must be two different types of function, which cannot be algebraically evaluated into a single type of function.

But how exactly do we derive that given function using the chain rule?

The Chain Rule states that the derivative of a composition of at least two different types of functions is equal to the derivative of the outside function *f*, and then multiplied by the derivative of its inner function *g*. The function *g* will be the domain of the derivative of the outside function *f.*

To better illustrate, we have

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

where you derive the outside function *f* by using the function *f*‘s derivative method while composing the original form of function *g* as its domain and then multiply the whole quantity by the derivative of the inner function *g* or *g(x)*.

We can also illustrate the chain rule formula 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 the inner function $latex g(x)$ in terms of $latex x$

Most of the time, this form of formula is used for beginners. Although, it has more steps, but it is proven to be more convenient and less confusing. This form uses a substitution method in the chain rule formula to derive the outside function/s.

Somewhat easy, right? But we should not take this formula superficially if we aim to be able to derive any composition of functions. In order to learn and understand the concepts behind the development of this chain rule formula, we need to be familiarized with any proof which would satisfy the statement of the chain rule.

Start now: Explore our additional Mathematics resources

## Proof of The Chain Rule

To understand this proof, you are highly recommended to be familiarized with the topics, *The Slope of a Tangent Line* and *Derivatives Using Limits*.

We can recall that a derivative can be express in terms of limits in the following way:

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{f(x+h)-f(x)}{h}}$$

Now, let’s suppose we have the following function:

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

Then, if we get the derivative, we have,

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

We can use the derivation in terms of limits:

$$H'(x) = \lim \limits_{h \to 0} {\frac{H(x+h)-H(x)}{h}}$$

By substituting the equation $latex H(x) = f(g(x))$, we have

$$H'(x) = \lim \limits_{h \to 0} {\frac{f(g(x+h)) – f(g(x))}{h}}$$

What manipulations can we do in this limit in order to arrive to the chain rule formula?

In our limit, we can multiply the function by

$$\frac{g(x+h)-g(x)}{g(x+h)-g(x)}$$

which is basically just equal to one. Thus, it won’t change our limit at all. By doing so, we have

$$\frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{h \to 0} \left( {\frac{f(g(x+h)) – f(g(x))}{h}} \cdot \frac{g(x+h)-g(x)}{g(x+h)-g(x)} \right)$$

Since we have a product of two fractions in our limit equation, we can apply the commutative property of multiplication in their denominators. By doing so, we have

$$\frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{h \to 0} \left( {\frac{f(g(x+h)) – f(g(x))}{g(x+h)-g(x)}} \cdot \frac{g(x+h)-g(x)}{h} \right)$$

By applying the properties of limits, we have

$$\frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{h \to 0} \left(\frac{f(g(x+h)) – f(g(x))}{g(x+h)-g(x)} \right) \cdot \lim \limits_{h \to 0} \left(\frac{g(x+h)-g(x)}{h} \right)$$

The second part of the right hand side is simply the derivative of *g*(*x*) written in limis. Then, we have

$$\frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{h \to 0} \left(\frac{f(g(x+h)) – f(g(x))}{g(x+h)-g(x)} \right) \cdot \frac{d}{dx}(g(x))$$

We can use the laws of limits to rearrange our limit like this:

$$ \frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{h \to 0} \left(\frac{1}{g(x+h)-g(x)} \right) \cdot \lim \limits_{h \to 0} \Big( f(g(x+h)) – f(g(x)) \Big) \cdot \frac{d}{dx}(g(x))$$

*Let’s mark this equation as $latex EQ.01$*

But before evaluating $latex EQ.01$, let

$latex \gamma = g(x+h)-g(x)$

*Let’s mark this equation as $latex EQ.02$*

Equating $latex EQ.02$ in terms of $latex g(x+h)$, we have

$latex g(x+h) = g(x) + \gamma$

*Let’s mark this equation as $latex EQ.03$*

If we evaluate

$$\lim \limits_{h \to 0} \left( \frac{1}{g(x+h)-g(x)} \right)$$

*Let’s mark this expression as $latex ex.01$*

from $latex EQ.01$, we have

$$\lim \limits_{h \to 0} \left( \frac{1}{g(x+h)-g(x)} \right) = \lim \limits_{h \to 0} \left( \frac{1}{\gamma} \right) $$

$$\lim \limits_{h \to 0} \left( \lim \limits_{h \to 0} \left( \frac{1}{\gamma} \right)\right) = \lim \limits_{h \to 0} \left( \lim \limits_{h \to 0} \left( \frac{1}{0} \right)\right) $$

And if evaluate the limit of $latex ex.01$ in terms of $latex \gamma \to 0$, we have

$$\lim \limits_{\gamma \to 0} \left( \lim \limits_{h \to 0} \left( \frac{1}{\gamma} \right) \right)= \lim \limits_{\gamma \to 0} \left( \lim \limits_{h \to 0} \left( \frac{1}{0} \right) \right)$$

Because of this, we can conclude that

$latex h \to 0 = \gamma \to 0$

Therefore, we can now evaluate $latex EQ.01$ in terms of $latex \gamma \to 0$ instead of $latex h \to 0$ to further solve our remaining limits. Thus, we have

$$\frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{\gamma \to 0} \left( \frac{1}{g(x+h)-g(x)} \right) \cdot \lim \limits_{\gamma \to 0} \Big( f(g(x+h))– f(g(x)) \Big) \cdot \frac{d}{dx}(g(x))$$

*Let’s mark this equation as $latex EQ.04$*

By substituting $latex EQ.02$ and $latex EQ.03$ into $latex EQ.04$, we have

$$\frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{\gamma \to 0} \left( \frac{1}{\gamma} \right) \cdot \lim \limits_{\gamma \to 0} \Big( f(g(x) + \gamma) – f(g(x)) \Big) \cdot \frac{d}{dx}(g(x))$$

Multiplying the equation above, we have

$$\frac{d}{dx} \left( f(g(x)) \right) = \lim \limits_{\gamma \to 0} \left( {\frac{f(g(x) + \gamma) – f(g(x))}{\gamma}} \right) \cdot \frac{d}{dx}(g(x))$$

By solving the remaining limit, we have

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

or it can be simply illustrated as

$$H'(x) = \left( f(g(x)) \right)’ \cdot g'(x)$$

which is now * The Chain Rule Formula*.

Finally, we now have proven the chain rule formula *by applying the concepts of limits*.

## Chain Rule – Examples with Answers

### EXAMPLE 1

Derive the following:

$latex H(x) = (x+2)^2$

##### Solution

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}{x}(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+2)^2$

From the given, we have

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

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

$latex f(u) = u^2$

∴ $latex f(u)$ is a power function and will use the power formula to be derived

$latex u = g(x) = x+2$

∴ $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}{x}(g(x))$$

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

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

$$\frac{d}{dx} (H(x)) = (2u) \cdot (1)$$

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

$$\frac{d}{dx} (H(x)) = [2 \cdot (x+2)] \cdot (1)$$

Simplifying algebraically, we have

$latex H'(x) = 2(x+2)$

**And the final answer is:**

$latex H'(x) = 2x + 4$

### EXAMPLE 2

**W**hat is the derivative of $latex F(x) = (x^3+\sin{(x)})^2$?

##### Solution

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

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

$latex f(u) = u^2$

∴ $latex f(u)$ is a power function and will use the power rule to be derived

$latex u = g(x) = x^3 + \sin{(x)}$

∴ $latex g(x)$ is a sum of power and trigonometric 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}{x}(g(x))$$

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

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

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

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

$$\frac{d}{dx} (F(x)) = [2(x^3 + \sin{(x)})] \cdot (3x^2 + \cos{(x)})$$

Simplifying algebraically, we have

$$F'(x) = (2x^3 + 2\sin{(x)}) \cdot (3x^2 + \cos{(x^3)})$$

**And the final answer is:**

$$F'(x) = (2x^3 + 2\sin{(x)}) (3x^2 + \cos{(x^3)})$$

### EXAMPLE 3

Derive the function:

$latex F(x) = \ln{(3x^2-1)}$

##### Solution

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

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

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

∴ $latex f(u)$ is a logarithmic function and will use the derivative of logarithmic functions to be derived

$latex u = g(x) = 3x^2-1$

∴ $latex g(x)$ is a 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} (F(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{x}(g(x))$$

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

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

$$\frac{d}{dx} (F(x)) = (\frac{1}{u}) \cdot (6x)$$

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

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

Simplifying algebraically, we have

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

**And the final answer is:**

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

### EXAMPLE 4

What is the derivative of $latex G(x) = e^{3x^2+1}$?

##### Solution

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

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

$latex f(u) = e^u$

∴ $latex f(u)$ is a exponential function and will use the derivative of exponential functions to be derived

$latex u = g(x) = 3x^2+1$

∴ $latex g(x)$ is a 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} (G(x)) = \frac{d}{dx} \left(f(g(x)) \right) \cdot \frac{d}{x}(g(x))$$

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

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

$$\frac{d}{dx} (G(x)) = (e^u) \cdot (6x)$$

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

$$\frac{d}{dx} (G(x)) = (e^{3x^2+1}) \cdot (6x)$$

Simplifying algebraically, we have

$$G'(x) = 6x \cdot e^{3x^2+1}$$

**And the final answer is:**

$$G'(x) = 6xe^{3x^2+1}$$

### EXAMPLE 5

Find the derivative of the following function:

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

##### Solution

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

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

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

$latex f(u) = u^3$

∴ $latex f(u)$ is a power function and will use power formula to be derived

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

$latex g(h(x)) = g(v)$

$latex g(v) = \sin{(v)}$

∴ $latex g(v)$ is a trigonometric function and will use the derivative of trigonometric functions to be derived

$latex v = h(x) = x^3$

∴ $latex h(x)$ is a power function and will use power formula to be derived

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

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

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

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

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

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

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

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

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

Simplifying algebraically, we have

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

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

**And the final answer is:**

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

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

## 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**