Hersi Maths WhatsApp me

Understand · explore · practise

Chain rule

Learn the chain rule for composite functions, including powers, roots, trigonometric functions, exponentials and logarithms. Choose each layer yourself, then practise with full worked solutions.

Before you startComposite functions; basic differentiation; exponential and trigonometric derivatives

01 / Connect two changing quantities

Differentiate each stage, then multiply the local rates.

A composite function applies one operation after another. Write u = g(x), then y = f(u). A small change in x produces a change in u; that change in u produces a change in y.

dy/dx = (dy/du)(du/dx)
If y = f(g(x)), then y′ = f′(g(x))g′(x).

The inner function must be differentiable at x and the outer function differentiable at the corresponding u.

The derivative notation helps us remember how the rates connect. It is a derivative theorem, not permission to cancel arbitrary symbols. In the explorer, watch which stage makes a rate negative or zero.

Two local rates multiplyExplore
Input, intermediate value and outputAt x zero, u equals one and y equals one. The inner rate is two, the outer rate is three and their product is six.x = 0u = 1y = 1du/dxdy/dudy/dx236Left: negative · centre: zero · right: positive

u = 2x + 1; y = u³.

du/dx = 2; dy/du = 3; dy/dx = 2 × 3 = 6.

Both stages are increasing locally, so the composition is increasing here.

All three bars use the same numerical scale. These are instantaneous rates at the selected input, not exact multipliers for a large change. Angles are in radians.

02 / Identify the outside and the inside

The final operation is the outside function.

Differentiate y = (3x² − 2)⁴Worked example

u = 3x² − 2; y = u⁴

First form the bracket; then raise it to the fourth power.

du/dx = 6x; dy/du = 4u³

Differentiate with respect to each stage’s own input.

dy/dx = 4u³ × 6x = 24x(3x² − 2)³

Substitute back so the answer is in x.

Leave the bracket intact unless expanding makes a later step easier. The outside derivative is evaluated at the inside value, so 4x³ × 6x would be wrong.

01 · Choose the layers

For y = (5x − 4)⁶, identify u, dy/du and du/dx, then differentiate.

Hint

The last operation is raising a bracket to power 6.

Worked solution

u = 5x − 4, dy/du = 6u⁵ and du/dx = 5. Thus dy/dx = 30(5x − 4)⁵.

02 · Diagnose an error

A student differentiates (x² + 7)³ as 3(x² + 7)². What is missing?

Hint

Has the inside x² + 7 been differentiated?

Worked solution

The missing factor is 2x. The correct derivative is 6x(x² + 7)².

03 / See why the rates multiply

The finite-change ratio approaches the derivative.

Take u = 2x + 1 and y = u³ at x = 1. The point has u = 3, y = 27. The two local rates are du/dx = 2 and dy/du = 3u² = 27, giving dy/dx = 54.

Make the input step smallerWorked example

Δu = 2h

Changing x from 1 to 1 + h changes u from 3 to 3 + 2h.

Δy = (3 + 2h)³ − 27

This is the exact output change.

Δy/h = 54 + 36h + 8h² → 54

As h tends to zero, the higher-order terms disappear.

For h = 0.1 the average rate is 57.68. That does not contradict the derivative 54: a finite step samples changing slopes. The chain rule gives the limiting rate.

Watch two stages approach their local product

Pause, replay or seek freely. The notes explain the same idea and stay in view.

03 · Zero in either stage

For y = (x² + 1)³, explain why the derivative is zero at x = 0 even though dy/du = 3 there.

Hint

Look at the inner derivative.

Worked solution

u = x² + 1 has du/dx = 2x = 0. The product 3u² × 2x is therefore zero.

04 / Use positive and negative powers

The general power rule keeps the inner derivative.

d/dx[g(x)ⁿ] = n[g(x)]ⁿ⁻¹g′(x)

Use the rule only where the original function and the required derivatives exist.

Differentiate y = (2x² + 3)⁻²Worked example

dy/dx = −2(2x² + 3)⁻³ × 4x

Reduce the outside exponent by one.

dy/dx = −8x/(2x² + 3)³

A negative exponent belongs in the denominator.

04 · Negative power

Differentiate y = (4 − x)⁻³ and state its domain.

Hint

The inside derivative is −1.

Worked solution

dy/dx = 3(4 − x)⁻⁴ = 3/(4 − x)⁴, for x ≠ 4. The two negative factors cancel.

05 · A nonlinear bracket

Differentiate y = (x³ − 2x)⁵.

Hint

Keep x³ − 2x as one inside function.

Worked solution

dy/dx = 5(x³ − 2x)⁴(3x² − 2).

05 / Separate a function’s domain from its derivative

A square root may exist where its derivative does not.

Differentiate y = √(7 − 2x)Worked example

y = (7 − 2x)¹ᐟ², with x ≤ 7/2

The root’s argument may equal zero in the original function.

dy/dx = (1/2)(7 − 2x)⁻¹ᐟ² × (−2)

Apply the power rule at interior points.

dy/dx = −1/√(7 − 2x), for x < 7/2

There is no finite derivative at the endpoint.

A more subtle case is √(x²) = |x|. Its domain is all real x, but its derivative is −1 for x < 0 and +1 for x > 0. At zero there is a corner. Substituting zero into an invalid derivative expression cannot repair this.

06 · A square root

Differentiate √(9 + x²). Does its derivative have an excluded real input?

Hint

The argument is at least 9.

Worked solution

The derivative is x/√(9 + x²), valid for every real x.

07 · A reciprocal root

Differentiate 1/√(3x − 2), giving the original real domain.

Hint

Write (3x − 2)⁻¹ᐟ².

Worked solution

The domain is x > 2/3. The derivative is −3/[2(3x − 2)³ᐟ²], valid on that same domain.

06 / Keep the angle inside the trig function

Differentiating the outside does not erase its input.

d/dx[sin g(x)] = cos(g(x))g′(x)
d/dx[cos g(x)] = −sin(g(x))g′(x)

Angles are in radians.

Differentiate sin(x² + 3)Worked example

u = x² + 3; y = sin u

The outside operation is sine.

dy/du = cos u; du/dx = 2x

Use a derivative for each layer.

dy/dx = 2x cos(x² + 3)

The cosine keeps the entire original angle.

08 · Cosine of a cubic

Differentiate cos(2x³ − 1).

Hint

Cosine contributes a minus sign.

Worked solution

The derivative is −6x² sin(2x³ − 1).

09 · A squared sine

Differentiate sin²(3x).

Hint

Read this as [sin(3x)]², so there are three stages.

Worked solution

The derivative is 2sin(3x) × cos(3x) × 3 = 6sin(3x)cos(3x), also equal to 3sin(6x).

07 / Apply exponential and logarithm rules

For a logarithm, divide the inside derivative by the inside.

d/dx[eᵍ⁽ˣ⁾] = eᵍ⁽ˣ⁾g′(x)
d/dx[ln g(x)] = g′(x)/g(x), where g(x) > 0

Differentiate ln(5 − x²)Worked example

Domain: −√5 < x < √5

The logarithm argument must be strictly positive.

g′(x) = −2x

Differentiate the inside.

dy/dx = −2x/(5 − x²)

Retain the original domain although the rational expression exists elsewhere.

10 · Nonlinear exponent

Differentiate e4x − x².

Hint

The exponent’s derivative is 4 − 2x.

Worked solution

The derivative is (4 − 2x)e4x − x².

11 · Logarithm domain

Differentiate ln(x² − 9), with its domain.

Hint

Solve x² − 9 > 0 first.

Worked solution

The derivative is 2x/(x² − 9), valid only for x < −3 or x > 3. The interval between −3 and 3 is not in the original domain.

08 / Work from outside to inside

For three layers, include three derivative factors.

Differentiate y = exp[(1 + sin x)²]Worked example

v = sin x; u = (1 + v)²; y = eᵘ

Name each changing intermediate quantity.

dy/du = eᵘ; du/dv = 2(1 + v); dv/dx = cos x

Each derivative uses its own input.

dy/dx = 2(1 + sin x)cos x · exp[(1 + sin x)²]

Substitute all layers back.

You can write a single line once the layers are clear. Naming them is a useful way to check that no factor has disappeared.

12 · A log of a root

Differentiate ln(√(2x + 5)), and state the domain.

Hint

Either use three stages or simplify to (1/2)ln(2x + 5).

Worked solution

The domain is x > −5/2. The derivative is 1/(2x + 5). Using stages gives [1/√(2x + 5)] × [1/(2√(2x + 5))] × 2.

13 · Exponential inside sine

Differentiate sin(e²ˣ).

Hint

The outside derivative is cosine evaluated at e²ˣ.

Worked solution

The derivative is 2e²ˣ cos(e²ˣ).

09 / Use the derivative at a point

Find the point on the original curve and the slope from its derivative.

Tangent to y = (x² + 2)³ at x = 1Worked example

y = 3³ = 27

The contact point is (1, 27).

y′ = 6x(x² + 2)²; y′(1) = 54

Evaluate both inside and outside factors.

y − 27 = 54(x − 1)

Point and slope determine the tangent.

14 · A normal

Find the normal to y = √(2x + 7) at x = 1.

Hint

The point is (1, 3), and the tangent slope is 1/3.

Worked solution

The normal slope is −3. Thus y − 3 = −3(x − 1), or y = 6 − 3x.

15 · Stationary inputs

Find every stationary point of y = (x² − 4)².

Hint

Factor y′ as 4x(x² − 4); either factor can be zero.

Worked solution

x = −2, 0, 2. The points are (−2, 0), (0, 16), (2, 0). Since y″ = 12x² − 16, the outer two are minima and the middle one is a maximum.

10 / Check when a rule can be used

An undefined factor needs analysis, not a guessed product.

The standard chain rule requires differentiability of the outer function at the inside value. For y = (√x)² on x ≥ 0, the simplified function is y = x. At x = 0 the square-root derivative is undefined, so writing 2√x × 1/(2√x) and cancelling at zero is not justified.

The original function has right-hand derivative 1 at zero. It has no ordinary two-sided derivative there because its real domain does not extend to the left. Simplification makes the behaviour clearer but must keep the original domain.

16 · A cancellation with a missing point

For y = ln(ex²), simplify first and differentiate. Is there a domain exclusion?

Hint

The exponential is strictly positive for every real x.

Worked solution

y = x² for every real x, so y′ = 2x everywhere. Direct chaining gives [1/ex²]ex²·2x = 2x, with no zero denominator and no exclusions.

11 / Check every layer

Keep the original input, multiply every factor and retain the domain.

  • Identify the final operation as the outside function.
  • Differentiate the outside at the inside value.
  • Multiply by the derivative of the inside; repeat for extra layers.
  • Check logarithm, root and denominator restrictions before substituting.
  • Use the original function for coordinates and the derivative for gradients.

Review exponential and logarithmic derivatives →

Section 1 of 11 · Connect two changing quantities