What Is The Chain Rule?
The chain rule is the derivative rule for a composite function, a function built by feeding one function into another, written $f(g(x))$. It states that the derivative of the outer function, evaluated at the inner function, is multiplied by the derivative of the inner function.
$$\frac{d}{dx},f(g(x)) = f'(g(x))\cdot g'(x)$$
Two pieces do all the work. The outer function $f$ is the operation you apply last, and the inner function $g$ is the one tucked inside it. For $\sin(x^2)$, the outer function is sine and the inner function is $x^2$; you meet $x^2$ first and hand its result to sine.
The same rule has a second, equivalent form using Leibniz notation. If $y = f(u)$ and $u = g(x)$, then:
$$\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}$$
Both forms say one thing: to differentiate a chain of functions, differentiate each link and multiply the results. This article uses prime notation $f'(x)$ throughout its worked examples for consistency, and treats the Leibniz form as the same statement in different clothing. The chain rule is one of the core rules of differentiation, alongside the derivative power, product, and quotient rules, and it is the one that unlocks almost every function beyond the simplest polynomials.
How Do You Use The Chain Rule?
Applying the chain rule is a fixed four-step routine. Identify the layers, differentiate the outer layer, differentiate the inner layer, then multiply.
Step 1, spot the layers. Decide which operation is applied last (the outer function) and which sits inside it (the inner function).
Step 2, differentiate the outer function. Take its derivative, but leave the inner function untouched inside it.
Step 3, differentiate the inner function. Find $g'(x)$ on its own.
Step 4, multiply. The answer is $f'(g(x))\cdot g'(x)$.
Example 1: Differentiate $(3x^2+1)^5$.
The outer function is "raise to the fifth power," and the inner function is $g(x) = 3x^2 + 1$.
$$\frac{d}{dx}(3x^2+1)^5 = 5(3x^2+1)^{4}\cdot \frac{d}{dx}(3x^2+1)$$
The inner derivative is $g'(x) = 6x$. Substituting it in:
$$= 5(3x^2+1)^{4}\cdot 6x = 30x,(3x^2+1)^{4}$$
Final answer: $\dfrac{d}{dx}(3x^2+1)^5 = 30x,(3x^2+1)^{4}$.
Notice the factor $6x$. Skip it and you would be left with $5(3x^2+1)^4$, which is wrong. That missing inner derivative is the error we return to later.
How Do You Derive The Chain Rule?
The chain rule comes straight from the idea that a derivative is a rate of change, and that rates along a chain multiply. Suppose $y = f(u)$ and $u = g(x)$. A small change $\Delta x$ produces a change $\Delta u$ in the inner value, which in turn produces a change $\Delta y$ in the output.
When $\Delta u \neq 0$, one line of algebra links the three changes:
$$\frac{\Delta y}{\Delta x} = \frac{\Delta y}{\Delta u}\cdot\frac{\Delta u}{\Delta x}$$
Let $\Delta x \to 0$. Because $g$ is differentiable it is continuous, so $\Delta u \to 0$ as well, and each ratio approaches a derivative:
$$\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} = f'(g(x))\cdot g'(x)$$
To be honest about the fine print: the step of dividing by $\Delta u$ fails whenever $\Delta u = 0$. A fully rigorous proof, of the kind Cauchy and later Carathéodory gave, patches that special case, but the rate-multiplying picture above is the correct intuition and the reason the formula looks like fractions cancelling.
Geometrically, a derivative is the slope of a tangent line. The chain rule says the steepness of the whole composite equals the steepness of the outer function, measured at the inner value, times the steepness of the inner function. A gentle inner slope softens a steep outer one, and a sharp inner slope amplifies it.
What Are Some Worked Examples Of The Chain Rule?
The routine is always the same. These three examples move from a single layer to a genuine nesting of three functions.
Example 2: Differentiate $\sin(x^2)$.
The outer function is sine, the inner function is $g(x) = x^2$ with $g'(x) = 2x$.
$$\frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x = 2x\cos(x^2)$$
Final answer: $\dfrac{d}{dx}\sin(x^2) = 2x\cos(x^2)$.
Example 3: Differentiate $e^{\cos x}$.
The outer function is the exponential, the inner function is $g(x) = \cos x$ with $g'(x) = -\sin x$.
$$\frac{d}{dx}e^{\cos x} = e^{\cos x}\cdot(-\sin x) = -\sin x;e^{\cos x}$$
Final answer: $\dfrac{d}{dx}e^{\cos x} = -\sin x;e^{\cos x}$.
Example 4: Differentiate $e^{\sin(x^2)}$ (a nested, double chain).
Here three functions are stacked: the exponential on the outside, sine in the middle, and $x^2$ on the inside. Peel one layer at a time, and apply the chain rule again to the middle layer.
$$\frac{d}{dx}e^{\sin(x^2)} = e^{\sin(x^2)}\cdot \frac{d}{dx}\sin(x^2)$$
The inner piece $\dfrac{d}{dx}\sin(x^2)$ is Example 2, which equals $2x\cos(x^2)$. Substituting it in:
$$= e^{\sin(x^2)}\cdot 2x\cos(x^2) = 2x\cos(x^2),e^{\sin(x^2)}$$
Final answer: $\dfrac{d}{dx}e^{\sin(x^2)} = 2x\cos(x^2),e^{\sin(x^2)}$.
Each extra layer adds one more multiplied factor. A chain of three functions gives a product of three derivatives, and the pattern never changes no matter how deep the nesting goes.
What Are The Standard Chain-Rule Forms?
Most textbook derivatives are a known outer function wrapped around some inner function $g(x)$. Memorising the outer-function derivatives turns the chain rule into fast pattern-matching.
Table: Standard chain-rule forms for a differentiable inner function $g(x)$.
Outer function | Derivative by the chain rule |
|---|---|
$[g(x)]^{n}$ | $n,[g(x)]^{,n-1},g'(x)$ |
$\sin(g(x))$ | $\cos(g(x)),g'(x)$ |
$\cos(g(x))$ | $-\sin(g(x)),g'(x)$ |
$\tan(g(x))$ | $\sec^{2}(g(x)),g'(x)$ |
$e^{,g(x)}$ | $e^{,g(x)},g'(x)$ |
$\ln(g(x))$ | $\dfrac{g'(x)}{g(x)}$ |
$\sqrt{g(x)}$ | $\dfrac{g'(x)}{2\sqrt{g(x)}}$ |
The trigonometric rows connect directly to the differentiation of trigonometric functions; every one of them is really the basic trig derivative with an inner derivative $g'(x)$ attached. Once these forms are automatic, differentiating $\tan(5x)$ or $\ln(x^2+1)$ takes a single glance.
Why Does The Chain Rule Work?
The chain rule is not a memory trick bolted onto calculus. It is what has to be true once a derivative is understood as a rate of change.
Rates compound along a chain. If $y$ changes three times as fast as $u$, and $u$ changes twice as fast as $x$, then $y$ changes six times as fast as $x$. Six is three times two, the two rates multiplied.
Each link scales the next. The inner function sets how fast its input feeds the outer function, and the outer function scales that incoming rate. The final rate is the product of the two scalings.
The geometry agrees. Reading derivatives as tangent slopes, the composite's slope is the outer slope times the inner slope, which is exactly the product the formula predicts.
That is also why the inner derivative can never be dropped. If the inner function changes quickly, it drives the outer function harder, and the answer must grow to match. The factor $g'(x)$ is the messenger carrying that information, and an answer without it describes a different, slower function.
Who Discovered The Chain Rule?
The chain rule grew out of the very first years of calculus, in the notation battle between its two founders.
Two more figures shaped the rule into its modern form:
Isaac Newton (1643–1727, England) developed the same differential calculus independently and used the chain rule implicitly in his work on motion, though in a different notation.
Augustin-Louis Cauchy (1789–1857, France) supplied the rigorous limit-based proof in the nineteenth century, closing the gap left by the informal "cancel the differentials" argument.
Where Is The Chain Rule Used In The Real World?
Any time one quantity depends on a second that depends on a third, the chain rule connects their rates. That pattern is everywhere in calculus applications.
Related rates in physics. When a balloon inflates, its volume depends on its radius, and its radius depends on time. The chain rule links the two rates and answers how fast the volume grows.
Motion and speed. A car's fuel use depends on its speed, and its speed depends on time; the rate fuel drains is the product of those two rates.
Economics. Cost depends on output, and output depends on labour hours; the marginal cost per hour is a chain of two derivatives.
Machine learning. Training a neural network runs on backpropagation, which is the chain rule applied through many nested layers to see how each weight affects the final error.
Engineering and signals. Temperature at a point may depend on position, and position on time, so the rate a sensor's reading changes is again a chain-rule product.
The related-rates case is worth doing in numbers. A spherical balloon has volume $V = \tfrac{4}{3}\pi r^{3}$, so by the chain rule the rate of volume change is:
$$\frac{dV}{dt} = \frac{dV}{dr}\cdot\frac{dr}{dt} = 4\pi r^{2},\frac{dr}{dt}$$
If the radius is $r = 5$ cm and grows at $\dfrac{dr}{dt} = 2$ cm/s, then $\dfrac{dV}{dt} = 4\pi(5)^2(2) = 200\pi \approx 628.3185$ cm³/s. The volume races ahead of the radius exactly as the hook promised, and the chain rule is what measures the gap.
What Are The Most Common Mistakes With The Chain Rule?
These three errors account for most lost marks on chain-rule problems, and they match the errors flagged in MIT's calculus notes and widely reported in student forums: failing to apply the rule, forgetting the inner derivative, and confusing it with the product rule.
Forgetting the inner derivative $g'(x)$.
Where it slips in:
A student differentiates the outer function correctly, writes $\frac{d}{dx}(3x^2+1)^5 = 5(3x^2+1)^4$, and stops.
Don't do this:
Do not treat the inside as if it were a bare $x$. The layer $3x^2+1$ has its own derivative that must be multiplied in.
The correct way:
Always finish with the inner derivative. Here $g'(x) = 6x$, so the answer is $5(3x^2+1)^4\cdot 6x = 30x(3x^2+1)^4$.
Misreading which function is inner and which is outer.
Where it slips in:
For $\sin(x^2)$ a student differentiates as though it were $(\sin x)^2$, mixing up the order of the layers.
Don't do this:
Do not guess the layers. $\sin(x^2)$ means "square first, then take sine," while $(\sin x)^2$ means "take sine first, then square," and they have different derivatives.
The correct way:
Read the function from the inside out, asking which operation acts last. For $\sin(x^2)$ the outer function is sine, giving $\cos(x^2)\cdot 2x$.
Confusing the chain rule with the product rule.
Where it slips in:
A student sees two functions and multiplies their derivatives, using the chain rule on a genuine product like $x^2\sin x$.
Don't do this:
Do not apply the chain rule to a product of functions, or the product rule to a composition. A composite is one function inside another; a product is two functions side by side.
The correct way:
Check the structure first. $\sin(x^2)$ is a composition, so use the chain rule; $x^2\sin x$ is a product, so use the product rule $f'g + fg'$.
Practice Problems On The Chain Rule
Differentiate each function. Answers follow each line, and each was checked by re-reading the layers from the inside out.
$\dfrac{d}{dx}(5x-2)^3$.
(Answer: $3(5x-2)^2\cdot 5 = 15(5x-2)^2$.)$\dfrac{d}{dx}\cos(4x)$.
(Answer: $-\sin(4x)\cdot 4 = -4\sin(4x)$.)$\dfrac{d}{dx}(x^2+3x)^{10}$.
(Answer: $10(x^2+3x)^{9}(2x+3)$.)$\dfrac{d}{dx}e^{7x}$.
(Answer: $e^{7x}\cdot 7 = 7e^{7x}$.)$\dfrac{d}{dx}\sin^{2}x$.
(Answer: $2\sin x\cos x$, using outer $u^2$ and inner $\sin x$.)$\dfrac{d}{dx}\sqrt{9x^2+4}$.
(Answer: $\dfrac{18x}{2\sqrt{9x^2+4}} = \dfrac{9x}{\sqrt{9x^2+4}}$.)
Where Should You Go Next After The Chain Rule?
The chain rule sits at the centre of differentiation, and several natural doors open from here.
Differentiation of trigonometric functions. Every trig derivative combines with the chain rule the moment the angle is anything more complicated than a bare $x$.
Derivative formula reference. Revisit the power, product, and quotient rules that the chain rule works alongside.
Tangents and normals. See how the slopes the chain rule computes become tangent and normal lines to a curve.
If your child is building these calculus foundations, a live Bhanzu trainer teaches the chain rule starting from the "why" (rates multiplying along a chain) rather than a formula to memorise, in the Bhanzu math classes.
Was this article helpful?
Your feedback helps us write better content
