Skip to main content

Differentiation and the Chain Rule

An input is squared and then passed through another function. How does an input change travel through both stages? This chapter derives the product and chain rules and keeps their conditions explicit.

  • Chain rule: The derivative of a composition uses the outer derivative at the inner output multiplied by the inner derivative.

Differentiate a two-stage calculation​

Let g(x)=x2g(x)=x^2 and f(u)=euf(u)=e^u. The composite is f(g(x))=ex2f(g(x))=e^{x^2}, with derivative 2xex22xe^{x^2}. The inner increment is approximately g′(a)hg'(a)h and the outer increment is approximately f′(g(a))g′(a)hf'(g(a))g'(a)h.

If gg is differentiable at aa and ff at g(a)g(a), the chain rule is

(f∘g)′(a)=f′(g(a))g′(a).(f\circ g)'(a)=f'(g(a))g'(a).

The evaluation point of the outer derivative matters. It is g(a)g(a), not usually aa.

Input increments propagated through an inner and outer scalar function
Multiply local responses in composition order and evaluate each at its own input.

Combine functions​

Where f,gf,g are differentiable,

(cf+g)′=cf′+g′,(fg)′=f′g+fg′.(cf+g)'=cf'+g',\qquad (fg)'=f'g+fg'.

For the product rule, write the increment as f(a+h)[g(a+h)−g(a)]+g(a)[f(a+h)−f(a)]f(a+h)[g(a+h)-g(a)]+g(a)[f(a+h)-f(a)], divide by hh, and use continuity of ff. If g(a)≠0g(a)\ne0, the quotient rule follows:

(fg)′(a)=f′(a)g(a)−f(a)g′(a)g(a)2.\left(\frac fg\right)'(a)=\frac{f'(a)g(a)-f(a)g'(a)}{g(a)^2}.

The denominator condition is part of the claim.

Use familiar derivatives with their domains​

For positive integers nn, (xn)′=nxn−1(x^n)'=nx^{n-1}. Also (ex)′=ex(e^x)'=e^x, (log⁡x)′=1/x(\log x)'=1/x for x>0x>0, (sin⁡x)′=cos⁡x(\sin x)'=\cos x, and (cos⁡x)′=−sin⁡x(\cos x)'=-\sin x. Trigonometric derivative formulas use radians. If an angle is represented in degrees, converting it introduces a factor π/180\pi/180.

For a differentiable invertible scalar function with f′(a)≠0f'(a)\ne0 and a differentiable local inverse, (f−1)′(f(a))=1/f′(a)(f^{-1})'(f(a))=1/f'(a) by differentiating the inverse identity. The inverse-function theorem later supplies sufficient conditions for that inverse to exist and be differentiable.

Basic practice​

Prepare​

Reuse the functions from the composition chapter. Work with dimensionless inputs and radian angles.

Record assumed inputs, predictions, and exact calculations separately. If you use software, label rounded outputs; no physical measurement is implied.

Predict​

Would reversing two functions leave their derivatives unchanged?

Execute​

  1. Differentiate e^(x²) and (e^x)², then evaluate at x = 1.
  2. Differentiate x² sin x using the product rule.
  3. Differentiate log(x² + 1) and state its real domain.

Observe and record​

Case or quantityPredictionExact result or argumentError or software check
e^(x²) at 1
(e^x)² at 1
x² sin x
log(x² + 1)

Check after working: The first values are 2e and 2e². The product derivative is 2x sin x + x² cos x. The logarithmic derivative is 2x/(x² + 1), defined for all real x.

Optional extension​

Derive the quotient rule by combining the product rule with the derivative of u ↦ 1/u.

Keep and continue​

Keep the derivative formulas and their domain restrictions. Next, use derivative signs to answer global questions on intervals.

Previous: Local Linear Approximation

Next: What Derivatives Tell You