Chain Rule Notes

Published on: September 29, 2026

These Chain Rule Notes explain how to differentiate a function sitting inside another function, with the working shown line by line. The outer function is differentiated with the inner one left untouched, and the result is then multiplied by the derivative of the inner function. Forgetting that second factor is the usual error. Following the same pattern every time keeps the outer and inner layers clearly separate.

Step-by-step method

  1. Set up the problem.
  2. Write the chain rule formula.
  3. Differentiate the outer function with respect to u.
  4. Differentiate the inner function with respect to the variable.
  5. Multiply the derivatives and substitute u back.

Formula: Chain Rule

This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Useful Tips to Remember

The chain rule says \(\frac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x)\): differentiate the outer function, keep the inside unchanged, then multiply by the derivative of the inside. Forgetting to multiply by the inner derivative is the most common mistake. For functions with several layers, apply the rule once for each layer, working from the outside in.

Required knowledge

Where Is the Chain Rule Used?

The chain rule differentiates a function inside another function, multiplying the derivative of the outer part by the derivative of the inner part. Real quantities are often linked in chains, such as the volume of a balloon depending on its radius, which depends on time, so the chain rule connects their rates of change. It is used in physics for related rates, in economics when one quantity drives another, and it is the core of backpropagation, the method that trains neural networks in artificial intelligence.

  • Training neural networks with backpropagation
  • Solving related rates problems, like a balloon being inflated
  • Differentiating functions such as \(\sin(3x^2)\) and \(e^{5x}\)
  • Linking rates of change in physics and chemistry
  • Working out how costs change when production depends on time

Chain Rule Practice Problems

Example 1 differentiates \((2x + 3)^5\), and Example 2 differentiates \(\sin(3x)\). Examples 3 and 4 give you two more of the same kind to try, \(f\left(x\right) = \left(4 x - 1\right)^{3}\) and \(f\left(x\right) = \cos{\left(2 x \right)}\). Try finding the outer and inner derivatives yourself before opening each example.

The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.

See Example 1 Hide Example 1

Problem

\(f\left(x\right) = \left(2 x + 3\right)^{5}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the chain rule formula.
  3. Differentiate the outer function with respect to u.
  4. Differentiate the inner function with respect to the variable.
  5. Multiply the derivatives and substitute u back.

Formula

Formula: Chain Rule

This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 1

Step 1 - Identify the inner function u and the outer function.

In this problem: The inner function is \(u = 2 x + 3\) and the outer function is \(u^{5}\).

\(\begin{gathered} u = 2 x + 3 \\ y = u^{5} \end{gathered}\)

Step 2

Step 2 - Write the chain rule formula.

In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 3

Step 3 - Differentiate the outer function with respect to u.

In this problem: Treat u as the variable: the derivative of \(u^{5}\) is \(5 u^{4}\).

\(\frac{dy}{du} = 5 u^{4}\)

Step 4

Step 4 - Differentiate the inner function with respect to the variable.

In this problem: The derivative of \(2 x + 3\) is \(2\).

\(\frac{du}{dx} = \frac{d}{dx}\left(2 x + 3\right) = 2\)

Step 5

Step 5 - Multiply the derivatives and substitute u back.

In this problem: Multiply the two derivatives and replace u with \(2 x + 3\), then simplify.

\(y'\left(x\right) = 10 \left(2 x + 3\right)^{4}\)

Final Answer

\(f'\left(x\right) = 10 \left(2 x + 3\right)^{4}\)
See Example 2 Hide Example 2

Problem

\(f\left(x\right) = \sin{\left(3 x \right)}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the chain rule formula.
  3. Differentiate the outer function with respect to u.
  4. Differentiate the inner function with respect to the variable.
  5. Multiply the derivatives and substitute u back.

Formula

Formula: Chain Rule

This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 1

Step 1 - Identify the inner function u and the outer function.

In this problem: The inner function is \(u = 3 x\) and the outer function is \(\sin{\left(u \right)}\).

\(\begin{gathered} u = 3 x \\ y = \sin{\left(u \right)} \end{gathered}\)

Step 2

Step 2 - Write the chain rule formula.

In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 3

Step 3 - Differentiate the outer function with respect to u.

In this problem: Treat u as the variable: the derivative of \(\sin{\left(u \right)}\) is \(\cos{\left(u \right)}\).

\(\frac{dy}{du} = \cos{\left(u \right)}\)

Step 4

Step 4 - Differentiate the inner function with respect to the variable.

In this problem: The derivative of \(3 x\) is \(3\).

\(\frac{du}{dx} = \frac{d}{dx}\left(3 x\right) = 3\)

Step 5

Step 5 - Multiply the derivatives and substitute u back.

In this problem: Multiply the two derivatives and replace u with \(3 x\), then simplify.

\(y'\left(x\right) = 3 \cos{\left(3 x \right)}\)

Final Answer

\(f'\left(x\right) = 3 \cos{\left(3 x \right)}\)
See Example 3 Hide Example 3

Problem

\(f\left(x\right) = \left(4 x - 1\right)^{3}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the chain rule formula.
  3. Differentiate the outer function with respect to u.
  4. Differentiate the inner function with respect to the variable.
  5. Multiply the derivatives and substitute u back.

Formula

Formula: Chain Rule

This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 1

Step 1 - Identify the inner function u and the outer function.

In this problem: The inner function is \(u = 4 x - 1\) and the outer function is \(u^{3}\).

\(\begin{gathered} u = 4 x - 1 \\ y = u^{3} \end{gathered}\)

Step 2

Step 2 - Write the chain rule formula.

In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 3

Step 3 - Differentiate the outer function with respect to u.

In this problem: Treat u as the variable: the derivative of \(u^{3}\) is \(3 u^{2}\).

\(\frac{dy}{du} = 3 u^{2}\)

Step 4

Step 4 - Differentiate the inner function with respect to the variable.

In this problem: The derivative of \(4 x - 1\) is \(4\).

\(\frac{du}{dx} = \frac{d}{dx}\left(4 x - 1\right) = 4\)

Step 5

Step 5 - Multiply the derivatives and substitute u back.

In this problem: Multiply the two derivatives and replace u with \(4 x - 1\), then simplify.

\(y'\left(x\right) = 12 \left(4 x - 1\right)^{2}\)

Final Answer

\(f'\left(x\right) = 12 \left(4 x - 1\right)^{2}\)
See Example 4 Hide Example 4

Problem

\(f\left(x\right) = \cos{\left(2 x \right)}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the chain rule formula.
  3. Differentiate the outer function with respect to u.
  4. Differentiate the inner function with respect to the variable.
  5. Multiply the derivatives and substitute u back.

Formula

Formula: Chain Rule

This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 1

Step 1 - Identify the inner function u and the outer function.

In this problem: The inner function is \(u = 2 x\) and the outer function is \(\cos{\left(u \right)}\).

\(\begin{gathered} u = 2 x \\ y = \cos{\left(u \right)} \end{gathered}\)

Step 2

Step 2 - Write the chain rule formula.

In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.

\(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)

Step 3

Step 3 - Differentiate the outer function with respect to u.

In this problem: Treat u as the variable: the derivative of \(\cos{\left(u \right)}\) is \(- \sin{\left(u \right)}\).

\(\frac{dy}{du} = - \sin{\left(u \right)}\)

Step 4

Step 4 - Differentiate the inner function with respect to the variable.

In this problem: The derivative of \(2 x\) is \(2\).

\(\frac{du}{dx} = \frac{d}{dx}\left(2 x\right) = 2\)

Step 5

Step 5 - Multiply the derivatives and substitute u back.

In this problem: Multiply the two derivatives and replace u with \(2 x\), then simplify.

\(y'\left(x\right) = - 2 \sin{\left(2 x \right)}\)

Final Answer

\(f'\left(x\right) = - 2 \sin{\left(2 x \right)}\)

Calculator and Practice Mode