Imagine you're assembling a toy. First you put part A into part B, then you put that combined piece into part C. The final toy's position depends on how you moved A, which then affected B, which then affected C. That's exactly what the chain rule captures — how a change in the first variable ripples through a sequence of functions to affect the final output.
Let's make this concrete. Suppose you have a function f that depends on g, and g itself depends on x:
y=f(g(x))
You want to know: if x changes by a tiny amount, how much does y change? The answer isn't just f′(g(x)) — because g(x) itself changes when x changes. You have to multiply the two rates:
How fast does g change with respect to x? That's g′(x).
How fast does f change with respect to its input g? That's f′(g(x)).
The total effect is the product:
dxdy=f′(g(x))⋅g′(x)
Note
In Leibniz notation, this looks even more natural: dxdy=dudy⋅dxdu, where u=g(x). The du's "cancel" like fractions — though this is just a helpful memory aid, not a rigorous proof.
The Precise Statement
Chain Rule (single variable): If g is differentiable at x and f is differentiable at g(x), then the composite function h(x)=f(g(x)) is differentiable at x, and
h′(x)=f′(g(x))⋅g′(x)
That's it. One multiplication. But the power is enormous — it lets you differentiate almost any nested function.
A Simple Example
Differentiate h(x)=sin(3x2).
Here f(u)=sinu and g(x)=3x2. Then:
f′(u)=cosu, so f′(g(x))=cos(3x2)
g′(x)=6x
Multiply: h′(x)=cos(3x2)⋅6x=6xcos(3x2)
Watch out
The most common mistake is forgetting to multiply by the inner derivative. Students often write dxdsin(3x2)=cos(3x2) and stop — that's wrong. The chain rule demands you also multiply by 6x.
Why It's Called a "Chain"
Think of a chain of links: x→g→f. Each link has its own rate of change. To find the total rate from x to f, you multiply the rates of each link. If you had three functions — say h(x)=f(g(k(x))) — you'd multiply three derivatives: …
Substituting x2=cos2θ collapses the messy fraction inside tan−1 into tan(4π+θ), so y=4π+21cos−1(x2) and the Chain Rule gives dxdy=−1−x4x.
Attacking this directly with the quotient rule and two nested square roots would be brutal. The smart move is to simplify the argument of tan−1before differentiating. Whenever you see 1+x2 and 1−x2 appearing together, reach for a substitution that turns both radicals into clean trig functions.
1. Pick the right substitution
Let x2=cos2θ. Because −1<x<1 with x=0, we have 0<x2<1, so cos2θ∈(0,1), giving 2θ∈(0,π/2) and therefore
θ∈(0,4π),cosθ>0,sinθ>0.
Using the half-angle identities 1+cos2θ=2cos2θ and 1−cos2θ=2sin2θ:
1+x2=2cos2θ=2cosθ,1−x2=2sin2θ=2sinθ.
The positivity of cosθ and sinθ on (0,π/4) lets us drop the absolute values safely.
2. Simplify the fraction
Substitute and cancel the common 2:
1+x2−1−x21+x2+1−x2=cosθ−sinθcosθ+sinθ.
Divide top and bottom by cosθ (nonzero here):
1−tanθ1+tanθ.
The tangent addition formula tan(α+β)=1−tanαtanβtanα+tanβ with α=4π (so tanα=1) and β=θ gives exactly
1−tanθ1+tanθ=tan(4π+θ).
3. Remove the inverse tangent — carefully
So the function is
y=tan−1[tan(4π+θ)].
The identity tan−1(tanu)=u is only valid when u∈(−2π,2π), so we must check the range. …
Use this whenever the argument of sin−1, cos−1, or tan−1 contains 1+x2 and/or 1−x2 together — a direct quotient/chain-rule attack on such an expression is usually a mess, so simplify the argument first.
Steps
Step 1: Spot the pattern and choose a substitution
Whenever you see 1+x2 paired with 1−x2, the half-angle identities 1+cos2θ=2cos2θ and 1−cos2θ=2sin2θ suggest setting
x2=cos2θ(i.e. θ=21cos−1(x2)).
Always note the domain of x first and pin down the resulting range of θ — this determines the signs of sinθ,cosθ and which branch of the inverse function is valid later.
Step 2: Rewrite both radicals as trig functions
1+x2=2cosθ,1−x2=2sinθ.
Substitute these into the original quotient; the 2 factors cancel, and dividing numerator and denominator by cosθ turns the expression into a ratio of 1±tanθ.
Step 3: Collapse to a single angle using a standard identity …
Mistake 1: Attacking the fraction directly with the quotient rule on two nested square roots
Why it's wrong: the raw quotient rule on 1+x2−1−x21+x2+1−x2 produces a huge, error-prone expression full of nested radicals. Correct approach: recognize the 1+x2,1−x2 pair as a signal to substitute x2=cos2θ, which turns both radicals into 2cosθ,2sinθ and collapses the whole fraction to tan(4π+θ) before any differentiation happens.
Mistake 2: Removing tan−1(tanu) without checking the range of u …