Chain Rule Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Chain Rule.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

The derivative of a composite function f(g(x))f(g(x)) equals f(g(x))g(x)f'(g(x)) \cdot g'(x): the derivative of the outer function evaluated at the inner, times the derivative of the inner.

Derivative of outside times derivative of inside. Unpack layers.

Read the full concept explanation →

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: The chain rule differentiates a composite f(g(x))f(g(x)) as f(g(x))f'(g(x)) times g(x)g'(x), peeling layers from outside in.

Common stuck point: The procedure for chain rule is the easy part; the trap is forgetting the inner-derivative factor g(x)g'(x). Asking "Is one function plugged into another, so I must multiply the outer derivative by the inner derivative?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Is one function plugged into another, so I must multiply the outer derivative by the inner derivative?

Worked Examples

Example 1

easy
Find the derivative of f(x)=(3x+1)4f(x) = (3x + 1)^4.

Answer

f(x)=12(3x+1)3f'(x) = 12(3x + 1)^3

First step

1
Identify the outer function u4u^4 and the inner function u=3x+1u = 3x + 1.

Full solution

  1. 2
    Apply the chain rule: ddx[u4]=4u3dudx\frac{d}{dx}[u^4] = 4u^3 \cdot \frac{du}{dx}.
  2. 3
    The derivative of the inner function: dudx=3\frac{du}{dx} = 3.
  3. 4
    Combine: f(x)=4(3x+1)33=12(3x+1)3f'(x) = 4(3x+1)^3 \cdot 3 = 12(3x+1)^3.
The chain rule says: differentiate the outer function, keep the inner function, then multiply by the derivative of the inner function. Think of it as peeling layers.

Example 2

medium
Find the derivative of f(x)=(x2+1)5f(x) = (x^2 + 1)^5.

Example 3

hard
Find the derivative of f(x)=sin(x3)f(x) = \sin(x^3).

Example 4

medium
Differentiate f(x)=sin3xf(x) = \sin^3 x.

Example 5

medium
Differentiate f(x)=ln(cosx)f(x) = \ln(\cos x).

Example 6

medium
Differentiate f(x)=ex2+3xf(x) = e^{x^2 + 3x}.

Example 7

medium
Differentiate f(x)=sin(cosx)f(x) = \sin(\cos x).

Example 8

hard
Differentiate f(x)=esin(2x)f(x) = e^{\sin(2x)}.

Example 9

hard
If y=tan1(2x)y = \tan^{-1}(2x), find dydx\tfrac{dy}{dx}.

Example 10

hard
A spherical balloon's radius grows at 22 cm/s. How fast is its volume changing when r=5r = 5 cm?

Example 11

challenge
Let ff be differentiable with f(1)=2f(1) = 2 and f(1)=3f'(1) = 3. If g(x)=f(f(x))g(x) = f(f(x)), find g(1)g'(1).

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Find the derivative of f(x)=(5x2)3f(x) = (5x - 2)^3.

Example 2

medium
Find the derivative of f(x)=4x+3f(x) = \sqrt{4x + 3}.

Example 3

easy
Differentiate f(x)=(x+1)3f(x) = (x+1)^3.

Example 4

easy
Differentiate f(x)=sin(2x)f(x) = \sin(2x).

Example 5

easy
Differentiate f(x)=e3xf(x) = e^{3x}.

Example 6

easy
Differentiate f(x)=(2x5)4f(x) = (2x-5)^4.

Example 7

easy
Differentiate f(x)=cos(x2)f(x) = \cos(x^2).

Example 8

easy
Differentiate f(x)=x2+1f(x) = \sqrt{x^2 + 1}.

Example 9

easy
Differentiate f(x)=(x3+1)2f(x) = (x^3 + 1)^2.

Example 10

easy
Differentiate f(x)=ex2f(x) = e^{x^2}.

Example 11

medium
Differentiate f(x)=sin2xf(x) = \sin^2 x.

Example 12

medium
Differentiate f(x)=sin(e3x)f(x) = \sin(e^{3x}) (two nested layers).

Example 13

medium
Differentiate f(x)=(3x2+2x)5f(x) = (3x^2 + 2x)^5.

Example 14

medium
Differentiate f(x)=ln(x2+1)f(x) = \ln(x^2 + 1).

Example 15

medium
Differentiate f(x)=tan(3x)f(x) = \tan(3x).

Example 16

medium
Differentiate f(x)=cos3(x)f(x) = \cos^3(x).

Example 17

medium
Differentiate f(x)=sinxf(x) = \sqrt{\sin x}.

Example 18

challenge
Differentiate f(x)=esin(x2)f(x) = e^{\sin(x^2)} (three layers).

Example 19

challenge
If h(x)=f(g(x))h(x) = f(g(x)) with g(2)=5g(2) = 5, g(2)=3g'(2) = 3, f(5)=4f'(5) = 4, find h(2)h'(2).

Example 20

challenge
Differentiate f(x)=1(x2+1)3f(x) = \frac{1}{(x^2+1)^3}.

Example 21

medium
Differentiate f(x)=e2xcosxf(x) = e^{2x}\cos x (chain and product rules).

Example 22

medium
Differentiate f(x)=sin(cosx)f(x) = \sin(\cos x).

Example 23

easy
Differentiate f(x)=(3x+7)2f(x) = (3x + 7)^2.

Example 24

easy
Differentiate f(x)=e5xf(x) = e^{5x}.

Example 25

easy
Differentiate f(x)=(1x)7f(x) = (1 - x)^7.

Example 26

easy
Differentiate f(x)=(x2+4)1/2f(x) = (x^2 + 4)^{1/2}.

Example 27

medium
Differentiate f(x)=esinxf(x) = e^{\sin x}.

Example 28

medium
Differentiate f(x)=tan(3x2)f(x) = \tan(3x^2).

Example 29

medium
Differentiate f(x)=sinxf(x) = \sqrt{\sin x}.

Example 30

medium
Find dydx\tfrac{dy}{dx} if y=(x2+1)10y = (x^2 + 1)^{10} at x=1x = 1.

Example 31

hard
Differentiate f(x)=ln(x+x2+1)f(x) = \ln(x + \sqrt{x^2 + 1}).

Example 32

hard
Differentiate f(x)=(2x+1)3(x21)2f(x) = (2x + 1)^3 (x^2 - 1)^2.

Example 33

hard
Find dydx\tfrac{dy}{dx} for y=(ln(3x2+1))5y = (\ln(3x^2 + 1))^5.

Background Knowledge

These ideas may be useful before you work through the harder examples.

derivativecomposition