Chain Rule, Composite and Inverse Functions

The chain rule says that the derivative of a composite function f(g(x)) is f′(g(x)) · g′(x): the derivative of the outer function evaluated at the inner function, times the derivative of the inner function. In brief: (sin 3x)′ = 3 cos 3x, ((x2 + 1)5)′ = 5(x2 + 1)4 · 2x and (ex2)′ = 2x ex2. For an inverse function, (f−1)′(y) = 1/f′(x) where y = f(x).

Most functions are compositions: layers of operations applied one after another. The chain rule peels the layers from the outside in, multiplying the derivative of each layer. It is the most frequently used rule in calculus. This guide states the rule in two notations, shows a step-by-step method, covers combinations with the product and quotient rules, derives the derivative of inverse functions (including arcsin and ln) and gives a table of chain rule forms.

What is the chain rule?

If y = f(u) and u = g(x), then dy/dx = (dy/du) · (du/dx), or (f ∘ g)′(x) = f′(g(x)) · g′(x). The intuition: if y changes 3 times as fast as u, and u changes 2 times as fast as x, then y changes 6 times as fast as x.

x u y ×2 ×3 ×6

Proof idea: dy/dx = lim (Δy/Δu)(Δu/Δx) = (dy/du)(du/dx) as Δx → 0, since Δu → 0 too (a careful proof treats the case Δu = 0 separately).

How do you apply it step by step?

  1. Identify the outer function f and the inner function g.
  2. Differentiate the outer function, leaving the inner function unchanged: f′(g(x)).
  3. Multiply by the derivative of the inner function: g′(x).
  4. For several layers, repeat from the outside.

Example 1: power of an expression

((3x + 1)4)′ = 4(3x + 1)3 · 3 = 12(3x + 1)3. And ((x2 − 5x)10)′ = 10(x2 − 5x)9(2x − 5).

Example 2: root of an expression

(√(x2 + 1))′ = (1/(2√(x2 + 1))) · 2x = x/√(x2 + 1). At x = 1: 1/√2 ≈ 0.707.

Example 3: trigonometric, exponential and logarithmic

(sin 3x)′ = 3 cos 3x. (cos(x2))′ = −2x sin(x2). (e−x)′ = −e−x. (ex2)′ = 2x ex2. (ln(x2 + 1))′ = 2x/(x2 + 1). And (ln f(x))′ = f′(x)/f(x) in general.

Example 4: several layers

(sin2(3x))′: the outermost layer is the square, then sin, then 3x: 2 sin(3x) · cos(3x) · 3 = 6 sin 3x cos 3x = 3 sin 6x. And (esin x)′ = esin x cos x. And (√(1 + cos2x))′ = (1/(2√(1 + cos2x))) · 2 cos x · (−sin x) = −sin x cos x/√(1 + cos2x).

Example 5: general exponentials

(ax)′ = (ex ln a)′ = ex ln a ln a = ax ln a. And (2x2)′ = 2x2 ln 2 · 2x.

How do you combine it with other rules?

Example 6: product and chain

(x e3x)′ = e3x + x · 3e3x = e3x(1 + 3x).

Example 7: quotient and chain

(sin x/(1 + x2)3)′ = [cos x (1 + x2)3 − sin x · 3(1 + x2)2 · 2x]/(1 + x2)6 = [cos x (1 + x2) − 6x sin x]/(1 + x2)4.

Example 8: logarithmic differentiation

For y = xx (x > 0): ln y = x ln x, so y′/y = ln x + 1 and y′ = xx(ln x + 1). At x = 2: 4(0.6931 + 1) = 6.77. The method also helps for products with many factors.

What is the derivative of an inverse function?

If f is differentiable and one-to-one with f′(x) ≠ 0, then the inverse g = f−1 satisfies g′(y) = 1/f′(g(y)). This follows from the chain rule applied to f(g(y)) = y: f′(g(y)) · g′(y) = 1. Graphically, the slopes of the tangents of f and f−1 at corresponding points (a, b) and (b, a) are reciprocals, since the graphs are reflections in y = x.

(1, e) (e, 1) ex ln x y = x

Example 9: the natural logarithm

g(y) = ln y is the inverse of f(x) = ex. g′(y) = 1/eln y = 1/y ✓.

Example 10: arcsin

g(y) = arcsin y is the inverse of sin x on [−π/2, π/2]. g′(y) = 1/cos(arcsin y) = 1/√(1 − y2). Check: at y = 1/2, arcsin = π/6, and cos(π/6) = √3/2, so g′ = 2/√3 ≈ 1.155; and 1/√(1 − 1/4) = 1/(√3/2) ✓. Similarly (arctan y)′ = 1/(1 + y2) and (arccos y)′ = −1/√(1 − y2).

Example 11: a specific value

f(x) = x3 + x. Find (f−1)′(10). Solve f(x) = 10: x = 2 (8 + 2 = 10). f′(2) = 3 · 4 + 1 = 13. So (f−1)′(10) = 1/13.

What is implicit differentiation?

When y is defined implicitly by an equation, differentiate both sides with respect to x, treating y as a function of x (use the chain rule for terms with y), and solve for y′.

Example 12

x2 + y2 = 25. Differentiate: 2x + 2y y′ = 0, so y′ = −x/y. At the point (3, 4): the slope is −3/4, perpendicular to the radius, as expected for a circle.

(3, 4) −3/4

Table of chain rule forms

Chain rule forms of common derivatives
Function Derivative Example
[u(x)]nn un−1 u′((2x + 1)3)′ = 6(2x + 1)2
√uu′/(2√u)(√(1 + x))′ = 1/(2√(1 + x))
euu′ eu(e5x)′ = 5e5x
ln uu′/u(ln(3x))′ = 1/x
sin uu′ cos u(sin(x2))′ = 2x cos(x2)
cos u−u′ sin u(cos 4x)′ = −4 sin 4x
arctan uu′/(1 + u2)(arctan 2x)′ = 2/(1 + 4x2)

Where does the rule come from?

The chain rule appears implicitly in the work of Leibniz, whose notation dy/dx = (dy/du)(du/dx) makes it look like cancelling fractions. He used the rule in his work in the 1670s. Lagrange and Cauchy gave formal statements in the late eighteenth and early nineteenth centuries. The notation (f ∘ g)′ = (f′ ∘ g) · g′ is standard today.

Where is it used?

Related rates in physics and engineering use the chain rule: if the radius of a balloon grows at 2 cm/s, the volume V = (4/3)πr3 grows at dV/dt = 4πr2 · dr/dt; at r = 10 cm: 4π · 100 · 2 ≈ 2,513 cm3/s. In machine learning, backpropagation is the chain rule applied through the layers of a neural network. In chemistry and economics, rates of change are linked through intermediate variables.

Which mistakes are common?

Forgetting the inner derivative

(sin 3x)′ = 3 cos 3x. The factor 3 comes from the inner function.

Differentiating the inner function inside the outer derivative

f′(g(x)) means the outer derivative evaluated at g(x). For (ex2)′ the outer derivative is eu, evaluated at u = x2.

Confusing sin2x with sin x2

(sin2x)′ = 2 sin x cos x, while (sin x2)′ = 2x cos x2.

Mixing up the inverse function and the reciprocal

(f−1)′ is 1/f′ evaluated at the corresponding point g(y), not 1/f′(y).