This deck is about differentiating a function built inside another function. It covers spotting the outer and inner pieces, both notations for the chain rule, and the generalized power rule, then works through trigonometric, exponential, and radical outer functions, double and triple compositions, chains inside the product and quotient rules, and chain values read from a table, closing with a preview of applied rates. It targets the classic errors of dropping the inner derivative, differentiating the inside in place, and misreading which piece is the inner function.
Subject: Calculus I · 134 slides · symbolic lesson
Open the interactive version of this deck · Homework for this lesson
Title
Calculus I - Unit 3
Differentiating a function that lives inside another function
Objectives
By the end of this deck you can:
Warm-up
Discussion prompt
Before we open The Chain Rule: without looking back, what was the main idea of The Product and Quotient Rules, and what could you do by the end of it that you could not do before?
Hint: One sentence for the idea, one for the skill. If the second one is blank, that is the part to revisit.
Answer:
That deck explains why the derivative of a product is not the product of the derivatives, then gives the product rule with its expanding-rectangle picture and the quotient rule, paying close attention to the order of the terms in its numerator. It covers when to simplify instead of grinding, products of three factors, and combining the rules, and finishes with rate-of-change applications such as marginal revenue and average cost. It targets the product-of-derivatives error, the reversed numerator, the unsquared denominator, and reaching for the quotient rule when plain division is easier.
Section
Section 1
Concept
Every rule you have so far handles a function of the variable itself. The power rule wants a plain variable raised to a power. The sine rule wants sine of a plain variable.
But real formulas usually have something more complicated sitting where that plain variable should be.
\[ (2x+7)^5 \qquad \sin(x^2) \qquad e^{\cos x} \qquad \sqrt{4x+1} \]
Each of these is a familiar function wrapped around a second function. That nesting is exactly what the chain rule is for.
Counterexample
Discussion prompt
Every rule you have so far handles a function of the variable itself. The power rule wants a plain variable raised to a power. The sine rule wants sine of a plain variable.
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Answer:
Each of these is a familiar function wrapped around a second function. That nesting is exactly what the chain rule is for.
Intuition
Figure (svg): Two boxes in a row: an input arrow enters the first box labelled inner g, its output feeds the second box labelled outer f, and an arrow leaves the second box
Picture two machines bolted together. You feed a number into the first machine. Whatever comes out is fed straight into the second machine.
The first machine is the inner function. The second machine is the outer function. Together they are one composite machine.
To know how sensitive the whole assembly is to a nudge at the input, you have to account for both machines. Ignoring the first one is the mistake this whole deck is built to prevent.
Analogy
Discussion prompt
Explain Two machines wired in a row by analogy to something with no Calculus I in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
Picture two machines bolted together. You feed a number into the first machine. Whatever comes out is fed straight into the second machine.
Picture it
Animation
Shows: Two machines wired in a row — a rendered Manim animation.
Rendered with Manim.
Takeaway: Gear ratios multiply, and so do derivatives.
Concept
composite function — A function formed by applying one function to the output of another: you run the inner function first, then feed its result into the outer function.
\[ y = f\big(g(x)\big) \]
Here the inner function is the one applied first to the input, and the outer function is the one applied last.
A quick test: read the formula out loud. The words you say last name the outer function.
Explain it
Discussion prompt
Explain Naming the outer and the inner to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
A quick test: read the formula out loud. The words you say last name the outer function.
Picture it
Animation
Shows: Naming the outer and the inner — a rendered Manim animation.
Rendered with Manim.
Takeaway: Name them before differentiating and the rule applies itself.
Concept
Two ways to write the same nested machine.
\[ (f \circ g)(x) = f\big(g(x)\big) \]
It is also handy to give the middle value its own name. Call the output of the inner machine the variable u.
\[ u = g(x) \qquad y = f(u) \]
That single letter u is the whole reason the Leibniz form of the chain rule looks so tidy.
Picture it
Animation
Shows: Composition notation — a rendered Manim animation.
Rendered with Manim.
Takeaway: The inner machine runs first, and the chain rule follows that order.
Ranking
Put in order
Put the moves of Worked example: decompose three formulas into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. You must finish computing the quantity in the parentheses before you can raise anything to a power, so that quantity is the inner function.
Worked example
For each formula, name the inner function and the outer function. No calculus yet - just seeing the structure.
\[ (2x+7)^5 \qquad \sin(x^2) \qquad e^{\cos x} \]
First formula: the last thing you do is raise to the fifth power
Why: You must finish computing the quantity in the parentheses before you can raise anything to a power, so that quantity is the inner function.
\[ u = 2x+7, \qquad y = u^5 \]
Second formula: the last thing you do is take a sine
Why: Reading it aloud you say sine of x squared - the word sine comes last, so sine is the outer function and the squaring happens first.
\[ u = x^2, \qquad y = \sin u \]
Third formula: the last thing you do is exponentiate
Why: The cosine is computed first and its value becomes the exponent, so the exponential is the outer function.
\[ u = \cos x, \qquad y = e^{u} \]
Verify each split by rebuilding the original formula
Why: Substituting the inner back into the outer must return exactly what you started with. All three do, so the decompositions are correct.
| inner u | outer y | rebuilt |
|---|---|---|
| 2x + 7 | u to the 5th | (2x + 7) to the 5th |
| x squared | sine of u | sine of x squared |
| cosine of x | e to the u | e to the cosine of x |
Picture it
Animation
Shows: Each line of the worked example "decompose three formulas", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Substituting the inner back into the outer must return exactly what you started with. All three do, so the decompositions are correct.
Anomaly
Predict first
A student writes this, and it looks reasonable:
Reading the notation too fast and swapping which piece is inside.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: The exponent was attached to the wrong object, so the outer function was taken to be the squaring.
Look at where the exponent sits: on the x, not on the word sine.
Why: The exponent was attached to the wrong object, so the outer function was taken to be the squaring.
Trap
Reading the notation too fast and swapping which piece is inside.
\[ y = \sin(x^2) \]
Treated it as the sine function squared
Why: The exponent was attached to the wrong object, so the outer function was taken to be the squaring.
\[ \text{read as } (\sin x)^2 \;\Rightarrow\; \frac{dy}{dx} = 2\sin x\cos x \]
The answer describes a different function entirely
Why: At x equal to 2 this claims a slope of about minus 0.757, while the true slope of sine of x squared there is 4 cos 4, about minus 2.615. Not close.
Look at where the exponent sits: on the x, not on the word sine.
\[ y = \sin(x^2) \]
Square first, then take the sine
Why: The exponent is inside the parentheses, so the squaring is the inner machine and the sine is the outer machine.
\[ u = x^2, \qquad y = \sin u \;\Rightarrow\; \frac{dy}{dx} = 2x\cos(x^2) \]
Keep the two notations apart for good
Why: Sine squared of x always means the sine taken first and then squared; sine of x squared always means the square taken first.
\[ \sin^2 x = (\sin x)^2 \qquad \text{but} \qquad \sin(x^2) \ne (\sin x)^2 \]
Notation
Annotate
From Trap: sine squared versus sine of a square — read this one piece at a time. What is each part doing?
On: \( \text{read as } (\sin x)^2 \;\Rightarrow\; \frac{dy}{dx} = 2\sin x\cos x \)
Concept
The power rule was proved for a plain variable raised to a power. Nothing in that proof says what happens when a whole expression sits in the base.
\[ \frac{d}{dx}\left[x^n\right] = nx^{n-1} \quad \text{-- proved for the variable alone} \]
So if you write down the power rule with a compound base and stop there, you are using a rule outside the case it was proved for. The next example shows exactly how far off that lands you.
Picture it
Animation
Shows: Why the rules you have do not reach — a rendered Manim animation.
Rendered with Manim.
Takeaway: Composition is a fourth way to build functions, and it needs its own rule.
Step zero
Discussion prompt
Worked example: the counterexample that forces a new rule — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Route one: expand first, then use the power rule honestly
Answer:
Worked example
Take a function simple enough that we can differentiate it two different ways and compare.
\[ f(x) = (3x)^2 \]
Route one: expand first, then use the power rule honestly
Why: Once expanded the base is a plain variable, so the power rule applies exactly as proved. This route is beyond dispute.
\[ f(x) = 9x^2 \;\Rightarrow\; f'(x) = 18x \]
Route two: apply the power rule and stop
Why: This is the tempting shortcut - bring the 2 down, drop the exponent by one, and leave the inside alone.
\[ 2(3x)^1 = 6x \]
The two routes disagree by a factor of 3
Why: The missing factor is exactly the derivative of the inside, and the inside was 3x whose derivative is 3. That is not a coincidence.
\[ 18x = 6x \cdot 3 \]
Verify the honest route with a numerical slope at x equal to 1
Why: Values of 9x squared at 0.999 and 1.001 are 8.982009 and 9.018009; the difference 0.036 over the run 0.002 gives 18, matching the expanded route exactly.
| x | f(x) | slope over the interval |
|---|---|---|
| 0.999 | 8.982009 | - |
| 1.001 | 9.018009 | 18 |
Picture it
Animation
Shows: Each line of the worked example "the counterexample that forces a new rule", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Values of 9x squared at 0.999 and 1.001 are 8.982009 and 9.018009; the difference 0.036 over the run 0.002 gives 18, matching the expanded route exactly.
Section
Section 2
Intuition
Figure (svg): Three circles of decreasing size in a row labelled x, u, and y, representing three linked gears
Three gears in a row. Turn the first one and the second turns; the second turns and the third turns.
Suppose the middle gear turns twice as fast as the one you are cranking, and the last gear turns three times as fast as the middle one.
How fast does the last gear turn compared to your hand? Six times as fast. The two ratios multiply.
That is the entire chain rule. A derivative is a rate of change, and along a chain of dependencies the rates multiply.
Picture it
Animation
Shows: Rates multiply along a chain — a rendered Manim animation.
Rendered with Manim.
Takeaway: This is the doorway to related rates.
Picture it
Animation
Shows: A sine wave compressing as its inner coefficient increases.
The inside sets the pace.
Takeaway: The inner function controls how fast the outer one is driven, and that pace is exactly the factor the chain rule makes you multiply by.
Concept
Write the middle value as u. Then the gear sentence turns straight into symbols.
\[ \frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} \]
This is the version that looks like the fractions cancel. They are not actually fractions, but the memory hook is honest here - the rule really does compose two rates.
Read it as: how fast y responds to x equals how fast y responds to u, times how fast u responds to x.
Picture it
Animation
Shows: The chain rule, Leibniz form — a rendered Manim animation.
Rendered with Manim.
Takeaway: It is not a fraction, but it remembers being one.
Concept
The same statement without inventing a name for the middle value.
\[ \frac{d}{dx}\Big[f\big(g(x)\big)\Big] = f'\big(g(x)\big)\cdot g'(x) \]
In words: the derivative of the outer function, evaluated at the unchanged inner function, times the derivative of the inner function.
The two words that carry all the weight are unchanged and times. The inside does not get differentiated where it sits - it gets copied down and then multiplied by its own derivative.
Picture it
Animation
Shows: The chain rule with its procedure spelled out.
One factor per layer, working outside in.
Takeaway: Differentiate the outside, leave the inside untouched, then multiply by the inside's derivative. Peeling one layer at a time makes any chain routine.
Concept
Line them up piece by piece and the match is exact.
| Leibniz piece | Prime piece | What it measures |
|---|---|---|
| dy/du | f prime of g(x) | how the outer machine responds, at the value the inner machine handed it |
| du/dx | g prime of x | how the inner machine responds to the original input |
| dy/dx | the product | how the whole assembly responds |
Use whichever notation makes a given problem easier to keep straight. Leibniz is friendlier for applied rate problems; prime form is friendlier when the functions are named.
Comparison
Comparison matrix
From The two forms are one statement: refill the Prime piece column from what you know. The rest of the table is as it appeared.
| Leibniz piece | Prime piece | What it measures |
|---|---|---|
| dy/du | f prime of g(x) | how the outer machine responds, at the value the inner machine handed it |
| du/dx | g prime of x | how the inner machine responds to the original input |
| dy/dx | the product | how the whole assembly responds |
Intuition
Think of the formula as an onion. The chain rule peels one layer at a time.
When you differentiate the outer layer, you write down its derivative and copy the inside exactly as it was. You do not touch it yet.
Then, as payment for having left it alone, you multiply by the derivative of that inside.
Peel, copy, multiply. Every chain-rule problem in this deck is that same three-word rhythm.
Estimation
Predict first
The workhorse case: a whole expression raised to a power.
Commit before you compute: what does Worked example: a power with a compound base come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify two ways: the exponent-one case and a numerical slope at x equal to 1
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Replacing the exponent 4 by 1 makes the formula give 6x, which is exactly the derivative of the inside on its own - a sanity check the rule must pass.
Worked example
The workhorse case: a whole expression raised to a power.
\[ y = \left(3x^2+5\right)^4 \]
Name the inner and outer functions
Why: The last operation performed is the fourth power, so the fourth power is the outer function and the quadratic inside the parentheses is the inner function.
\[ u = 3x^2+5, \qquad y = u^4 \]
Differentiate the outer function with respect to u
Why: With u in the base this is the ordinary power rule: bring the 4 down and drop the exponent to 3.
\[ \frac{dy}{du} = 4u^3 = 4\left(3x^2+5\right)^3 \]
Differentiate the inner function with respect to x
Why: The inside is an ordinary polynomial, so the power and constant rules finish it in one move.
\[ \frac{du}{dx} = 6x \]
Multiply the two rates together
Why: That is the chain rule: the response of y to u times the response of u to x. Then pull the numbers to the front.
\[ \frac{dy}{dx} = 4\left(3x^2+5\right)^3\cdot 6x = 24x\left(3x^2+5\right)^3 \]
Verify two ways: the exponent-one case and a numerical slope at x equal to 1
Why: Replacing the exponent 4 by 1 makes the formula give 6x, which is exactly the derivative of the inside on its own - a sanity check the rule must pass. Numerically, the function values at 0.999 and 1.001 differ by 24.57603, and dividing by the run 0.002 gives 12288, matching 24 times 8 cubed.
| x | y value | slope over the interval |
|---|---|---|
| 0.999 | 4083.73195 | - |
| 1.001 | 4108.30798 | 12288 |
Concept
That last example happens so often it gets its own name. It is just the chain rule with a power on the outside.
\[ \frac{d}{dx}\Big[\big(g(x)\big)^n\Big] = n\big(g(x)\big)^{n-1}\cdot g'(x) \]
generalized power rule — The chain rule applied when the outer function is a power: drop the exponent by one, keep the base untouched, then multiply by the derivative of the base.
It works for every exponent the power rule works for - positive, negative, and fractional. That last one is how radicals get handled.
Picture it
Animation
Shows: The generalized power rule — a rendered Manim animation.
Rendered with Manim.
Takeaway: The last factor is the one people drop.
Anomaly
Predict first
A student writes this, and it looks reasonable:
The single most common error in all of first-semester calculus: doing the outer layer and calling it done.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: The base was compound, so the plain power rule does not finish the job - but nothing about the written expression warns you.
Multiply by the derivative of the base. Here the base is a line with slope 5.
Why: The base was compound, so the plain power rule does not finish the job - but nothing about the written expression warns you.
Trap
The single most common error in all of first-semester calculus: doing the outer layer and calling it done.
\[ y = (5x-2)^3 \]
Applied the power rule and stopped
Why: The base was compound, so the plain power rule does not finish the job - but nothing about the written expression warns you.
\[ \frac{dy}{dx} \stackrel{?}{=} 3(5x-2)^2 \]
At x equal to 1 this claims a slope of 27
Why: Substituting gives 3 times 3 squared, which is 27. Hold on to that number.
\[ 3(5\cdot 1-2)^2 = 3\cdot 9 = 27 \]
Multiply by the derivative of the base. Here the base is a line with slope 5.
\[ y = (5x-2)^3 \]
Peel, copy, then multiply by the inner derivative
Why: The derivative of the inside 5x minus 2 is 5, and that factor multiplies everything.
\[ \frac{dy}{dx} = 3(5x-2)^2\cdot 5 = 15(5x-2)^2 \]
Check it against the fully expanded cubic
Why: Expanding gives a polynomial we can differentiate with no chain rule at all, and at x equal to 1 it returns 135 - five times the wrong answer, exactly the factor that was dropped.
\[ (5x-2)^3 = 125x^3-150x^2+60x-8 \;\Rightarrow\; 375x^2-300x+60 \;\Big|_{x=1} = 135 \]
Translation
\( \frac{dy}{dx} = 3(5x-2)^2\cdot 5 = 15(5x-2)^2 \)
Draw it
Translate both ways. First write the expression above as a sentence with no symbols in it at all. Then cover it, and write your sentence back as notation. If the two versions disagree, the disagreement is the thing to fix.
Pattern
Every chain-rule problem, start to finish:
\[ \frac{d}{dx}\Big[f\big(g(x)\big)\Big] = \underbrace{f'\big(g(x)\big)}_{\text{outer derivative, inside untouched}}\cdot\underbrace{g'(x)}_{\text{inner derivative}} \]
Check
Work it on paper first. Name the inner function out loud before you write anything.
\[ y = \left(4x^2-1\right)^5 \]
Check your understanding
What is the derivative?
Answer: A
Why: The outer function is the fifth power, giving 5 times the base to the fourth. The inner function 4x squared minus 1 has derivative 8x. Multiplying, 5 times 8x is 40x, so the derivative is 40x times the base to the fourth power.
Section
Section 3
Concept
You do not memorize new rules. You take the rules you know and put u where the plain variable used to be, then tack on the inner derivative.
| Outer function | Derivative for a plain variable | Chain-rule version |
|---|---|---|
| sine of x | cosine of x | cosine of u, times du/dx |
| cosine of x | negative sine of x | negative sine of u, times du/dx |
| tangent of x | secant squared of x | secant squared of u, times du/dx |
| e to the x | e to the x | e to the u, times du/dx |
\[ \frac{d}{dx}\big[\sin u\big] = \cos u\cdot\frac{du}{dx} \qquad \frac{d}{dx}\big[e^{u}\big] = e^{u}\cdot\frac{du}{dx} \]
Trade off
Comparison matrix
From Every derivative rule gets a chain-rule version: every row here is a choice with a cost. Fill the Chain-rule version column, then say which row you would actually pick and what you give up for it.
| Outer function | Derivative for a plain variable | Chain-rule version |
|---|---|---|
| sine of x | cosine of x | cosine of u, times du/dx |
| cosine of x | negative sine of x | negative sine of u, times du/dx |
| tangent of x | secant squared of x | secant squared of u, times du/dx |
| e to the x | e to the x | e to the u, times du/dx |
Picture it
Animation
Shows: Every rule gets a chain-rule version — a rendered Manim animation.
Rendered with Manim.
Takeaway: One extra factor, every time, without exception.
Fill the middle
Fill in the blanks
From Worked example: a trig outer — finish the line. Write what belongs on the right of the equals sign before you look.
\frac15x^2___ = ___
Why: Producing the right-hand side unprompted is the difference between recognising this line and being able to use it. You would compute 5 times x cubed first and take the sine of that result last, so the sine is the outer function.
Worked example
A sine with a cubic living inside it.
\[ y = \sin\!\left(5x^3\right) \]
Name the pieces
Why: You would compute 5 times x cubed first and take the sine of that result last, so the sine is the outer function.
\[ u = 5x^3, \qquad y = \sin u \]
Differentiate the sine, copying the inside verbatim
Why: The derivative of sine is cosine, and the chain rule says the argument does not change during this step.
\[ \frac{dy}{du} = \cos u = \cos\!\left(5x^3\right) \]
Differentiate the inside
Why: The constant-multiple and power rules give 5 times 3x squared.
\[ \frac{du}{dx} = 15x^2 \]
Multiply and put the polynomial factor in front
Why: Writing the algebraic factor first is standard form and makes the answer easier to read and to check.
\[ \frac{dy}{dx} = 15x^2\cos\!\left(5x^3\right) \]
Verify with the small-angle behaviour near the origin
Why: For inputs near zero the sine of a quantity is very nearly that quantity, so near the origin the function behaves like 5x cubed, whose derivative is 15x squared. Our answer near zero is 15x squared times the cosine of nearly zero, which is 15x squared. The two agree.
\[ \sin\!\left(5x^3\right)\approx 5x^3 \;\Rightarrow\; \frac{dy}{dx}\approx 15x^2 \quad (x \text{ near } 0) \]
Picture it
Animation
Shows: Each line of the worked example "a trig outer", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: For inputs near zero the sine of a quantity is very nearly that quantity, so near the origin the function behaves like 5x cubed, whose derivative is 15x squared. Our answer near zero is 15x squared times the cosine of nearly zero, which is 15x squared. The two agree.
Pattern
Predict first
The table runs: numerical | -2.524 · correct chain rule | -2.524
In Trap: differentiating the inside where it sits, given the rows so far: what is the next one — the row where method is inside differentiated in place?
Correct: inside differentiated in place | -0.990
| method | slope at x = 1 |
|---|---|
| numerical | -2.524 |
| correct chain rule | -2.524 |
| inside differentiated in place | -0.990 |
Why: The relationship between the columns, not the individual numbers, is what generates the next row. The cube inside got turned into 3x squared right where it stood, and the outer derivative was never taken at all.
Trap
A subtler slip than dropping the factor: replacing the inside with its own derivative instead of multiplying.
\[ y = \cos\!\left(x^3\right) \]
Differentiated the inner function in place
Why: The cube inside got turned into 3x squared right where it stood, and the outer derivative was never taken at all.
\[ \frac{dy}{dx} \stackrel{?}{=} \cos\!\left(3x^2\right) \]
At x equal to 1 this claims a slope of about negative 0.99
Why: The cosine of 3 is about negative 0.990, but the graph of cosine of x cubed is falling far more steeply than that at x equal to 1.
The inside is copied down untouched, and its derivative appears as a separate multiplied factor.
\[ y = \cos\!\left(x^3\right) \]
Peel the cosine, copy the cube, then multiply
Why: The derivative of cosine is negative sine, evaluated at the unchanged inside, and the inner derivative 3x squared multiplies the whole thing.
\[ \frac{dy}{dx} = -\sin\!\left(x^3\right)\cdot 3x^2 = -3x^2\sin\!\left(x^3\right) \]
Check against the true slope at x equal to 1
Why: Our formula gives negative 3 times the sine of 1, about negative 2.524. Function values at 0.999 and 1.001 are about 0.542822 and 0.537773, and their difference over the run 0.002 is about negative 2.524. The correct version matches; the wrong version does not.
| method | slope at x = 1 |
|---|---|
| numerical | -2.524 |
| correct chain rule | -2.524 |
| inside differentiated in place | -0.990 |
Comparison
Comparison matrix
From Trap: differentiating the inside where it sits: refill the slope at x = 1 column from what you know. The rest of the table is as it appeared.
| method | slope at x = 1 |
|---|---|
| numerical | -2.524 |
| correct chain rule | -2.524 |
| inside differentiated in place | -0.990 |
Concept
The natural exponential is its own derivative, so the outer step changes nothing at all. Only the inner derivative appears.
\[ \frac{d}{dx}\Big[e^{g(x)}\Big] = e^{g(x)}\cdot g'(x) \]
That makes exponentials the easiest place to spot a missing chain factor: the exponential part comes back unchanged, so anything else in your answer had better be the derivative of the exponent.
Sorting
Sort into buckets
These are the pieces of The Chain Rule, out of order. Put each one back under the part of the lesson it belongs to.
Step zero
Discussion prompt
Worked example: an exponential outer — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Name the pieces
Answer:
Worked example
A quadratic sitting in the exponent.
\[ y = e^{x^2-4x} \]
Name the pieces
Why: The exponent is computed first and the exponentiation happens last, so the exponential is the outer function.
\[ u = x^2-4x, \qquad y = e^{u} \]
Differentiate the outer function
Why: The natural exponential returns itself, with the exponent copied down exactly as written.
\[ \frac{dy}{du} = e^{u} = e^{x^2-4x} \]
Differentiate the exponent
Why: Power rule on the square and constant-multiple rule on the linear term.
\[ \frac{du}{dx} = 2x-4 \]
Multiply the two pieces
Why: Chain rule. Writing the polynomial factor first keeps the answer readable.
\[ \frac{dy}{dx} = (2x-4)\,e^{x^2-4x} \]
Verify with the shape of the graph
Why: The exponential factor is never zero, so the derivative vanishes only when 2x minus 4 is zero, that is at x equal to 2. The exponent is a parabola with its lowest point at x equal to 2, and the exponential function is increasing, so the composite bottoms out there and must have a horizontal tangent. Sign also checks out: negative before x equal to 2, positive after.
\[ \frac{dy}{dx}=0 \iff x = 2 \]
Concept
There is no separate square-root rule to learn. Convert the radical to a fractional exponent and the generalized power rule handles it.
\[ \sqrt{g(x)} = \big(g(x)\big)^{1/2} \;\Rightarrow\; \frac{d}{dx}\Big[\sqrt{g(x)}\Big] = \frac{g'(x)}{2\sqrt{g(x)}} \]
The rewriting step is not optional bookkeeping. Students who skip it are the ones who forget the exponent goes to negative one half, which is where the root ends up in the denominator.
Picture it
Animation
Shows: Radicals: rewrite before you differentiate — a rendered Manim animation.
Rendered with Manim.
Takeaway: The rewrite turns an unfamiliar shape into one you already handle.
Pattern
Predict first
The table runs: 1.9 | 2.93258 | - · 2.0 | 3.00000 | -
In Worked example: a radical outer, given the rows so far: what is the next one — the row where x is 2.1?
Correct: 2.1 | 3.06594 | 0.667
| x | square root of 4x + 1 | slope from 1.9 to 2.1 |
|---|---|---|
| 1.9 | 2.93258 | - |
| 2.0 | 3.00000 | - |
| 2.1 | 3.06594 | 0.667 |
Why: The relationship between the columns, not the individual numbers, is what generates the next row. The power rule is stated for exponents, not for root symbols, so make the exponent visible before differentiating.
Worked example
A square root with a line inside.
\[ y = \sqrt{4x+1} \]
Rewrite the radical as a one-half power
Why: The power rule is stated for exponents, not for root symbols, so make the exponent visible before differentiating.
\[ y = (4x+1)^{1/2} \]
Differentiate the outer power, copying the inside
Why: Bring the one half down and subtract one from the exponent: one half minus one is negative one half.
\[ \frac{dy}{du} = \tfrac{1}{2}(4x+1)^{-1/2} \]
Multiply by the inner derivative
Why: The derivative of 4x plus 1 is 4, and one half times 4 is 2.
\[ \frac{dy}{dx} = \tfrac{1}{2}(4x+1)^{-1/2}\cdot 4 = \frac{2}{\sqrt{4x+1}} \]
Verify with a table of nearby values at x equal to 2
Why: The formula predicts a slope of 2 over the square root of 9, which is two thirds, about 0.667. The values at 1.9 and 2.1 differ by 0.13336, and dividing by the run 0.2 gives about 0.667. They agree.
| x | square root of 4x + 1 | slope from 1.9 to 2.1 |
|---|---|---|
| 1.9 | 2.93258 | - |
| 2.0 | 3.00000 | - |
| 2.1 | 3.06594 | 0.667 |
Picture it
Animation
Shows: Each line of the worked example "a radical outer", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The formula predicts a slope of 2 over the square root of 9, which is two thirds, about 0.667. The values at 1.9 and 2.1 differ by 0.13336, and dividing by the run 0.2 gives about 0.667. They agree.
Check
Decide first which function is on the outside.
\[ y = \sin\!\left(3x^2\right) \]
Check your understanding
What is the derivative?
Answer: A
Why: The sine is the outer function, so its derivative is the cosine of the unchanged inside. The inside 3x squared has derivative 6x, and multiplying gives 6x times the cosine of 3x squared.
Section
Section 4
Concept
A composition can be nested as deeply as you like. Three layers is common on exams.
\[ y = f\Big(g\big(h(x)\big)\Big) \]
The rule extends the obvious way: one factor per layer, multiplied together.
\[ \frac{dy}{dx} = f'\Big(g\big(h(x)\big)\Big)\cdot g'\big(h(x)\big)\cdot h'(x) \]
Picture it
Animation
Shows: A three-layer composition differentiated one factor per layer.
Count the layers, count the factors.
Takeaway: Depth changes nothing about the method. Each layer contributes exactly one factor, and they multiply in the order you peel them.
Intuition
Back to the gear train. Add a fourth gear and the overall speed ratio is a product of three ratios instead of two.
Nothing about the idea changes - you just keep multiplying until you run out of gears.
\[ \frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dv}\cdot\frac{dv}{dx} \]
The practical warning: the factor students lose is almost always the innermost one, because by then it feels like the problem is over.
Pattern
A bookkeeping method that makes three-layer problems routine:
Count your factors at the end. Three layers means three factors. If you have two, you stopped early.
Edge cases
Discussion prompt
Peeling a multi-layer chain works on the cases you have just seen. Push it to the edge: what is the most degenerate input it still handles — empty, zero, one item, everything equal — and what is the first case where it stops being true? Name the case, not just "it breaks".
Hint: Try the smallest legal input, then the largest, then the one where two things collide. Methods are specified at their edges; the middle takes care of itself.
Answer:
A bookkeeping method that makes three-layer problems routine:
Ranking
Put in order
Put the moves of Worked example: a triple composition into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Writing them down is what stops the innermost factor from disappearing.
Worked example
Cube on the outside, sine in the middle, a linear function inside.
\[ y = \sin^3(2x) = \big[\sin(2x)\big]^3 \]
List the three layers before touching a derivative
Why: Writing them down is what stops the innermost factor from disappearing.
\[ \text{outer: } (\;)^3 \quad\to\quad \text{middle: } \sin(\;) \quad\to\quad \text{inner: } 2x \]
Peel the cube, copying the sine unchanged
Why: Generalized power rule: bring the 3 down, drop the exponent to 2, leave the base exactly as it was.
\[ 3\big[\sin(2x)\big]^2 \]
Peel the sine, copying the inside unchanged
Why: The derivative of sine is cosine, evaluated at the same argument 2x.
\[ \cdot\;\cos(2x) \]
Peel the innermost layer
Why: The derivative of 2x is 2. This is the factor most people forget, because the problem already looks finished.
\[ \cdot\;2 \]
Multiply all three factors together
Why: Three layers produced three factors, which is the count check the pattern slide asked for.
\[ \frac{dy}{dx} = 6\sin^2(2x)\cos(2x) \]
Verify at a point where the graph must be flat
Why: The sine reaches its maximum value of 1 when 2x equals a quarter turn, that is at x equal to pi over 4, so the cube also peaks there and the tangent must be horizontal. Our formula gives 6 times 1 times the cosine of a quarter turn, which is 0. It checks out.
\[ \left.\frac{dy}{dx}\right|_{x=\pi/4} = 6(1)^2\cos\!\left(\tfrac{\pi}{2}\right) = 0 \]
Picture it
Animation
Shows: Each line of the worked example "a triple composition", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The sine reaches its maximum value of 1 when 2x equals a quarter turn, that is at x equal to pi over 4, so the cube also peaks there and the tangent must be horizontal. Our formula gives 6 times 1 times the cosine of a quarter turn, which is 0. It checks out.
Hypothesis
Predict first
Worked example: a radical over a trig function is about to be worked. State your hypothesis first: which rule or definition decides this one, and what is the first move it forces? Then watch whether the example agrees with you.
Correct: Rewrite the root as a one-half power
Why: Same reason as before - the power rule needs a visible exponent to work with.
A hypothesis you wrote down is falsifiable; a vague sense of how it will go is not. If the example opens somewhere else, that gap is the thing worth chasing.
Worked example
Three layers again: a square root outside, a cosine in the middle, a doubling inside.
\[ y = \sqrt{4+\cos(2x)} \]
Rewrite the root as a one-half power
Why: Same reason as before - the power rule needs a visible exponent to work with.
\[ y = \big(4+\cos(2x)\big)^{1/2} \]
Peel the outer power
Why: One half comes down and the exponent becomes negative one half, with the whole quantity copied unchanged in the base.
\[ \tfrac{1}{2}\big(4+\cos(2x)\big)^{-1/2} \]
Peel the inside of the root
Why: The 4 is a constant so it contributes nothing, and the derivative of cosine is negative sine at the unchanged argument.
\[ \cdot\;\big(-\sin(2x)\big) \]
Peel the innermost layer and combine
Why: The derivative of 2x is 2, and the 2 cancels the one half, which is why the final answer looks so clean.
\[ \frac{dy}{dx} = \frac{-\sin(2x)}{\sqrt{4+\cos(2x)}} \]
Verify by squaring and differentiating implicitly
Why: Squaring gives y squared equal to 4 plus cosine of 2x. Differentiating both sides gives 2y times the derivative equal to negative 2 sine of 2x, so the derivative equals negative sine of 2x divided by y - exactly the answer above.
\[ y^2 = 4+\cos(2x) \;\Rightarrow\; 2y\,y' = -2\sin(2x) \;\Rightarrow\; y' = \frac{-\sin(2x)}{y} \]
Picture it
Animation
Shows: Each line of the worked example "a radical over a trig function", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Squaring gives y squared equal to 4 plus cosine of 2x. Differentiating both sides gives 2y times the derivative equal to negative 2 sine of 2x, so the derivative equals negative sine of 2x divided by y - exactly the answer above.
Anomaly
Predict first
A student writes this, and it looks reasonable:
Three layers, two factors written. The innermost one never got its turn.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: By this point the expression looks like a finished answer, so the derivative of the inner 4x never got multiplied in.
Count the layers first, then count your factors at the end. Three and three.
Why: By this point the expression looks like a finished answer, so the derivative of the inner 4x never got multiplied in.
Trap
Three layers, two factors written. The innermost one never got its turn.
\[ y = \cos^2(4x) \]
Peeled the square and the cosine, then stopped
Why: By this point the expression looks like a finished answer, so the derivative of the inner 4x never got multiplied in.
\[ \frac{dy}{dx} \stackrel{?}{=} 2\cos(4x)\cdot\big(-\sin(4x)\big) = -\sin(8x) \]
At one thirty-second of a turn this claims a slope of negative 1
Why: Substituting x equal to pi over 16 makes 8x a quarter turn, where the sine is 1, so this answer reports negative 1.
Count the layers first, then count your factors at the end. Three and three.
\[ y = \cos^2(4x) \]
Peel all three layers
Why: Square, then cosine, then the inner 4x whose derivative is 4 - and a double-angle identity tidies the product.
\[ \frac{dy}{dx} = 2\cos(4x)\cdot\big(-\sin(4x)\big)\cdot 4 = -4\sin(8x) \]
Check by rewriting with the half-angle identity first
Why: Cosine squared of 4x equals one half of the quantity 1 plus cosine of 8x. Differentiating that with a single easy chain step gives negative 8 sine of 8x over 2, which is negative 4 sine of 8x. That independent route confirms the factor of 4 belongs.
\[ \cos^2(4x) = \tfrac{1}{2}\big(1+\cos(8x)\big) \;\Rightarrow\; \frac{dy}{dx} = -4\sin(8x) \]
Notation
Annotate
From Trap: stopping one layer early — read this one piece at a time. What is each part doing?
On: \( \cos^2(4x) = \tfrac{1}{2}\big(1+\cos(8x)\big) \;\Rightarrow\; \frac{dy}{dx} = -4\sin(8x) \)
Check
Count the layers before you start, and count your factors when you finish.
\[ y = \cos^3(5x) \]
Check your understanding
What is the derivative?
Answer: A
Why: Three layers give three factors: 3 times the cosine squared from the outer cube, negative sine of 5x from the middle cosine, and 5 from the inner linear function. Multiplying 3 by 5 gives 15 and the sine carries the minus sign.
Section
Section 5
Concept
On a real problem the chain rule is usually a step inside a product rule or a quotient rule, not the whole job.
The order of operations is the same as when you evaluate: the outermost structure of the expression decides which rule you start with.
If the expression is fundamentally two things multiplied, start with the product rule. If it is one thing divided by another, start with the quotient rule. The chain rule then shows up when you differentiate one of the pieces.
Intuition
Think of the expression as a sentence with clauses. You parse the top-level structure first, then handle each clause on its own.
Every time a clause turns out to be a composite, that clause needs a chain rule of its own - and it needs it right where it stands, not at the end.
This is why the missing-factor error is so easy to make inside a product: you already did a chain rule earlier in the problem, so your brain marks the box as done.
Step zero
Discussion prompt
Worked example: product rule with a chained factor — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Name the two factors
Answer:
Worked example
The top-level structure here is a product, so the product rule leads.
\[ y = x^2 e^{3x} \]
Name the two factors
Why: The product rule needs both pieces labelled before you start, so nothing gets differentiated twice.
\[ f = x^2, \qquad g = e^{3x} \]
Differentiate the first factor
Why: Straight power rule, no composition here.
\[ f' = 2x \]
Differentiate the second factor - this one needs the chain rule
Why: The exponent is 3x, not a plain x, so the exponential comes back unchanged and gets multiplied by the derivative of the exponent, which is 3.
\[ g' = e^{3x}\cdot 3 = 3e^{3x} \]
Assemble with the product rule
Why: First times the derivative of the second, plus second times the derivative of the first.
\[ \frac{dy}{dx} = 2x\,e^{3x} + x^2\cdot 3e^{3x} \]
Factor the common pieces out
Why: Both terms share an exponential and an x, and factored form is what you need for finding where the derivative is zero.
\[ \frac{dy}{dx} = x\,e^{3x}\left(2+3x\right) \]
Verify at the origin using the shape of the function
Why: The function is a square times a positive exponential, so it is never negative and equals zero at x equal to 0 - that must be a minimum with a horizontal tangent. Our factored answer contains a factor of x, so it does vanish at x equal to 0. Consistent.
\[ \left.\frac{dy}{dx}\right|_{x=0} = 0\cdot e^{0}\cdot 2 = 0 \]
Picture it
Animation
Shows: Each line of the worked example "product rule with a chained factor", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The function is a square times a positive exponential, so it is never negative and equals zero at x equal to 0 - that must be a minimum with a horizontal tangent. Our factored answer contains a factor of x, so it does vanish at x equal to 0. Consistent.
Anomaly
Predict first
A student writes this, and it looks reasonable:
The product rule was applied correctly - but one of its two derivatives was computed carelessly.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: The exponential does return itself, which makes the answer look right, so the missing factor of 5 is easy to walk past.
Every composite piece gets its own chain rule, even mid-problem.
Why: The exponential does return itself, which makes the answer look right, so the missing factor of 5 is easy to walk past.
Trap
The product rule was applied correctly - but one of its two derivatives was computed carelessly.
\[ y = x^3 e^{5x} \]
Differentiated the exponential as if the exponent were a plain variable
Why: The exponential does return itself, which makes the answer look right, so the missing factor of 5 is easy to walk past.
\[ \frac{dy}{dx} \stackrel{?}{=} 3x^2e^{5x} + x^3e^{5x} \]
At x equal to 1 this claims a slope of about 594
Why: That is 4 times e to the fifth power, and e to the fifth is about 148.413, giving roughly 593.7.
\[ 3e^{5}+e^{5} = 4e^{5}\approx 593.7 \]
Every composite piece gets its own chain rule, even mid-problem.
\[ y = x^3 e^{5x} \]
Differentiate the exponential with the chain rule
Why: Copy the exponential unchanged, then multiply by the derivative of the exponent 5x, which is 5.
\[ \frac{dy}{dx} = 3x^2e^{5x} + 5x^3e^{5x} = x^2e^{5x}\left(3+5x\right) \]
Check against a numerical slope at x equal to 1
Why: The correct formula gives 8 times e to the fifth, about 1187.3. Function values at 0.999 and 1.001 differ by about 2.3746, and dividing by the run 0.002 gives about 1187.3. The version without the factor of 5 is off by half.
| method | slope at x = 1 |
|---|---|
| numerical | 1187.3 |
| with the chain factor | 1187.3 |
| chain factor dropped | 593.7 |
Trade off
Comparison matrix
From Trap: chain rule skipped inside a product term: every row here is a choice with a cost. Fill the slope at x = 1 column, then say which row you would actually pick and what you give up for it.
| method | slope at x = 1 |
|---|---|
| numerical | 1187.3 |
| with the chain factor | 1187.3 |
| chain factor dropped | 593.7 |
Concept
Same principle. The quotient rule sets the frame, and each of its two derivatives is computed with whatever rule that piece needs.
\[ \frac{d}{dx}\left[\frac{f}{g}\right] = \frac{f'g - fg'}{g^2} \]
Keep the numerator order straight - the term with the derivative of the top comes first. Reversing it flips the sign of your entire answer.
Picture it
Animation
Shows: Quotients with a chained piece — a rendered Manim animation.
Rendered with Manim.
Takeaway: Rules nest the way the functions nest.
Estimation
Predict first
The top-level structure is a quotient, so the quotient rule leads and the chain rule appears inside it.
Commit before you compute: what does Worked example: quotient rule with a chained numerator come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify the slope at the origin against the small-input behaviour
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Substituting x equal to 0 gives 3 times 1 times 1 minus 0, all over 1, which is 3.
Worked example
The top-level structure is a quotient, so the quotient rule leads and the chain rule appears inside it.
\[ y = \frac{\sin(3x)}{x^2+1} \]
Name the top and the bottom
Why: Labelling first prevents the classic order mix-up in the numerator.
\[ f = \sin(3x), \qquad g = x^2+1 \]
Differentiate the top with the chain rule
Why: Sine is outer, 3x is inner, so the derivative is the cosine of the unchanged argument times 3.
\[ f' = 3\cos(3x) \]
Differentiate the bottom
Why: Ordinary power and constant rules; no composition down here.
\[ g' = 2x \]
Assemble, keeping the numerator order
Why: Derivative of the top times the bottom, minus top times the derivative of the bottom, all over the bottom squared.
\[ \frac{dy}{dx} = \frac{3\cos(3x)\left(x^2+1\right) - 2x\sin(3x)}{\left(x^2+1\right)^2} \]
Verify the slope at the origin against the small-input behaviour
Why: Substituting x equal to 0 gives 3 times 1 times 1 minus 0, all over 1, which is 3. Independently, for inputs near zero the sine of 3x is about 3x and the denominator is about 1, so the function behaves like 3x near the origin - slope 3. They agree.
\[ \left.\frac{dy}{dx}\right|_{x=0} = \frac{3(1)(1)-0}{1} = 3 \]
Picture it
Animation
Shows: Each line of the worked example "quotient rule with a chained numerator", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Substituting x equal to 0 gives 3 times 1 times 1 minus 0, all over 1, which is 3. Independently, for inputs near zero the sine of 3x is about 3x and the denominator is about 1, so the function behaves like 3x near the origin - slope 3. They agree.
Check
Decide which rule sets the frame before you differentiate anything.
\[ y = x\,e^{4x} \]
Check your understanding
What is the derivative?
Answer: A
Why: Product rule gives 1 times the exponential plus x times the derivative of the exponential. The chain rule makes that second derivative 4 times the exponential, so the total is the exponential times the quantity 1 plus 4x.
Section
Section 6
Concept
You do not need formulas for the two functions. If somebody hands you a table of values, the chain rule still gives you an exact answer.
\[ (f\circ g)'(a) = f'\big(g(a)\big)\cdot g'(a) \]
Read the right-hand side carefully. The outer derivative is not evaluated at a. It is evaluated at the number the inner function produces from a.
Picture it
Animation
Shows: The chain rule works on numbers alone — a rendered Manim animation.
Rendered with Manim.
Takeaway: You never needed the formulas — only four numbers.
Intuition
Imagine walking into a room at the input value a. The inner machine immediately moves you to a different spot - the value it outputs.
The outer machine has no idea where you started. All it ever sees is the spot you were moved to, so its sensitivity must be measured there.
So a table problem is really a two-step lookup: first find where the inner function sends you, then look up the outer function's rate at that new location, and finally multiply by how fast the inner function is moving.
Estimation
Predict first
Two functions given only by a table. Find the derivative of the composite at the input 1.
Commit before you compute: what does Worked example: a chain-rule value from a table come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify by re-reading the two lookups in order
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Inner first: g of 1 is 2. Outer next: f prime of 2 is 4.
Worked example
Two functions given only by a table. Find the derivative of the composite at the input 1.
| x | f(x) | f prime of x | g(x) | g prime of x |
|---|---|---|---|---|
| 1 | 3 | 5 | 2 | -1 |
| 2 | 1 | 4 | 3 | 7 |
| 3 | 2 | 6 | 1 | 2 |
\[ \text{Find } (f\circ g)'(1) \]
Write the rule before touching the table
Why: Having the template on paper is what forces you to look up the outer derivative at the right place.
\[ (f\circ g)'(1) = f'\big(g(1)\big)\cdot g'(1) \]
Find where the inner function sends the input
Why: Read the g column at the row for 1. That output value is the only place the outer function is ever evaluated.
\[ g(1) = 2 \]
Look up the outer derivative at that value, not at 1
Why: Read the f prime column at the row for 2, because 2 is what the inner function handed to f.
\[ f'\big(g(1)\big) = f'(2) = 4 \]
Look up the inner derivative at the original input
Why: The inner function is being nudged at 1, so its rate is read at the row for 1.
\[ g'(1) = -1 \]
Multiply
Why: Chain rule: outer rate at the inner value, times the inner rate.
\[ (f\circ g)'(1) = 4\cdot(-1) = -4 \]
Verify by re-reading the two lookups in order
Why: Inner first: g of 1 is 2. Outer next: f prime of 2 is 4. Inner rate: g prime of 1 is negative 1. Product is negative 4. Note that using f prime of 1 instead would have given 5 times negative 1, which is negative 5 - a different number, so the evaluation point genuinely matters.
| what to read | where to read it | value |
|---|---|---|
| g | row 1 | 2 |
| f prime | row 2 | 4 |
| g prime | row 1 | -1 |
| product | - | -4 |
Picture it
Animation
Shows: Each line of the worked example "a chain-rule value from a table", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Inner first: g of 1 is 2. Outer next: f prime of 2 is 4. Inner rate: g prime of 1 is negative 1. Product is negative 4. Note that using f prime of 1 instead would have given 5 times negative 1, which is negative 5 - a different number, so the evaluation point genuinely matters.
Anomaly
Predict first
A student writes this, and it looks reasonable:
Same table, same question, one careless lookup.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: It feels natural to stay on one row, because that is how every other table exercise works.
Do the inner lookup first, then follow it to a different row.
Why: It feels natural to stay on one row, because that is how every other table exercise works.
Trap
Same table, same question, one careless lookup.
| x | f(x) | f prime of x | g(x) | g prime of x |
|---|---|---|---|---|
| 1 | 3 | 5 | 2 | -1 |
| 2 | 1 | 4 | 3 | 7 |
| 3 | 2 | 6 | 1 | 2 |
Read both derivatives from the row for 1
Why: It feels natural to stay on one row, because that is how every other table exercise works.
\[ (f\circ g)'(1) \stackrel{?}{=} f'(1)\cdot g'(1) = 5\cdot(-1) = -5 \]
The number is wrong and the reasoning is wrong
Why: The outer function never sees the input 1 at all. It only ever receives whatever the inner function produced.
Do the inner lookup first, then follow it to a different row.
| x | f(x) | f prime of x | g(x) | g prime of x |
|---|---|---|---|---|
| 1 | 3 | 5 | 2 | -1 |
| 2 | 1 | 4 | 3 | 7 |
| 3 | 2 | 6 | 1 | 2 |
Follow the inner value to the row it names
Why: The inner function sends 1 to 2, so the outer derivative must be read at 2 - which lives on a different row.
\[ (f\circ g)'(1) = f'\big(g(1)\big)\cdot g'(1) = f'(2)\cdot(-1) = 4\cdot(-1) = -4 \]
Check the habit, not just the number
Why: In a table problem you should always be reading from two different rows unless the inner function happens to fix the point. If every lookup came from one row, suspect this mistake.
Pattern
Step through it
Step through Trap: evaluating the outer derivative at the wrong number one row at a time. What is driving the change, and what would the row after the last one be?
Elimination
Eliminate the wrong options
What is the value of the derivative of g composed with f, at the input 3?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: The rule gives g prime of f of 3, times f prime of 3. Since f of 3 is 2, the outer derivative is g prime of 2, which is 7. The inner derivative f prime of 3 is 6, and 7 times 6 is 42.
Check
Same table, but now the outer and inner functions have traded places.
| x | f(x) | f prime of x | g(x) | g prime of x |
|---|---|---|---|---|
| 1 | 3 | 5 | 2 | -1 |
| 2 | 1 | 4 | 3 | 7 |
| 3 | 2 | 6 | 1 | 2 |
\[ \text{Find } (g\circ f)'(3) \]
Check your understanding
What is the value of the derivative of g composed with f, at the input 3?
Answer: A
Why: The rule gives g prime of f of 3, times f prime of 3. Since f of 3 is 2, the outer derivative is g prime of 2, which is 7. The inner derivative f prime of 3 is 6, and 7 times 6 is 42.
Pattern
Step through it
Step through Check yourself: the other composition one row at a time. What is driving the change, and what would the row after the last one be?
Section
Section 7
Concept
When a quantity depends on time through something else, the chain rule is the tool that links the two rates.
\[ \frac{dA}{dt} = \frac{dA}{dr}\cdot\frac{dr}{dt} \]
The units are the best proof that the rule is right. Square centimetres per centimetre, times centimetres per second, leaves square centimetres per second - exactly what the left side should be.
Intuition
You earn 20 dollars for every widget you assemble, and you assemble 15 widgets every hour.
Nobody needs calculus to say you earn 300 dollars an hour. You multiplied dollars per widget by widgets per hour.
That multiplication is the chain rule. Money depends on widgets, widgets depend on time, and the two rates compose.
Calculus only adds one thing: when the rates are not constant, you evaluate each of them at the right instant before multiplying.
Explain it
Discussion prompt
Explain The pay-rate chain to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
You earn 20 dollars for every widget you assemble, and you assemble 15 widgets every hour.
Step zero
Discussion prompt
Worked example: a spreading ripple — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Set up the chain of dependence
Answer:
Worked example
A stone lands in a pond. The circular ripple's radius grows at a steady 3 centimetres per second, so after t seconds the radius is 3t centimetres. How fast is the enclosed area growing at 2 seconds?
\[ A = \pi r^2, \qquad r = 3t \]
Set up the chain of dependence
Why: Area depends on radius, and radius depends on time, so the rate we want is a product of two rates.
\[ \frac{dA}{dt} = \frac{dA}{dr}\cdot\frac{dr}{dt} \]
Differentiate the area with respect to the radius
Why: Power rule with the constant pi out front. Units here are square centimetres per centimetre.
\[ \frac{dA}{dr} = 2\pi r \]
Read off the rate of the radius
Why: The radius is a linear function of time with slope 3, in centimetres per second.
\[ \frac{dr}{dt} = 3 \]
Multiply and then substitute the instant
Why: Substituting only after differentiating is the habit that will keep related-rates problems honest later. At 2 seconds the radius is 6 centimetres.
\[ \frac{dA}{dt} = 6\pi r \;\Big|_{r=6} = 36\pi \;\text{cm}^2\text{/s} \]
Verify by substituting first and differentiating once
Why: Writing the area directly in terms of time gives 9 pi t squared, whose derivative is 18 pi t. At 2 seconds that is 36 pi square centimetres per second - the same answer by a completely different route.
\[ A = \pi(3t)^2 = 9\pi t^2 \;\Rightarrow\; \frac{dA}{dt} = 18\pi t \;\Big|_{t=2} = 36\pi \]
Picture it
Animation
Shows: Each line of the worked example "a spreading ripple", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Writing the area directly in terms of time gives 9 pi t squared, whose derivative is 18 pi t. At 2 seconds that is 36 pi square centimetres per second - the same answer by a completely different route.
Concept
In that ripple problem you could have substituted first, because the radius had a formula in terms of time.
In most real problems you cannot. You know the rate of one quantity and want the rate of another, with no formula connecting either to time directly.
The chain rule is what makes those solvable: you differentiate the geometric relationship with respect to time, and every variable contributes its own rate factor. That whole technique gets its own deck.
Analogy
Discussion prompt
Explain This is the doorway to related rates by analogy to something with no Calculus I in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
In that ripple problem you could have substituted first, because the radius had a formula in terms of time.
Elimination
Eliminate the wrong options
What is the rate of change of the area, in square centimetres per second, at 3 seconds?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: The area rate is 2 pi r times the radius rate 2, which is 4 pi r. At 3 seconds the radius is 6 centimetres, so the rate is 24 pi square centimetres per second. Substituting first also works: the area is 4 pi t squared, whose derivative 8 pi t equals 24 pi at 3 seconds.
Check
Another circular ripple, but the radius now grows at 2 centimetres per second, so the radius after t seconds is 2t centimetres. Find how fast the area is growing at 3 seconds.
\[ A = \pi r^2, \qquad r = 2t \]
Check your understanding
What is the rate of change of the area, in square centimetres per second, at 3 seconds?
Answer: A
Why: The area rate is 2 pi r times the radius rate 2, which is 4 pi r. At 3 seconds the radius is 6 centimetres, so the rate is 24 pi square centimetres per second. Substituting first also works: the area is 4 pi t squared, whose derivative 8 pi t equals 24 pi at 3 seconds.
Section
Section 8
Concept
After enough practice you stop naming u and just see the structure. Here are the four that cover most problems.
| What you see | Outer function | Inner function | Factor to append |
|---|---|---|---|
| a bracket raised to a power | the power | whatever is in the bracket | derivative of the bracket |
| a trig function of an expression | the trig function | the expression | derivative of the expression |
| e raised to an expression | the exponential | the exponent | derivative of the exponent |
| a square root over an expression | the one-half power | what is under the root | derivative of what is under the root |
In all four rows the final column is the piece people forget. Train yourself to write that factor first, before you simplify anything.
Comparison
Comparison matrix
From Shapes you should recognize instantly: refill the Inner function column from what you know. The rest of the table is as it appeared.
| What you see | Outer function | Inner function | Factor to append |
|---|---|---|---|
| a bracket raised to a power | the power | whatever is in the bracket | derivative of the bracket |
| a trig function of an expression | the trig function | the expression | derivative of the expression |
| e raised to an expression | the exponential | the exponent | derivative of the exponent |
| a square root over an expression | the one-half power | what is under the root | derivative of what is under the root |
Picture it
Animation
Shows: Shapes you should recognise instantly — a rendered Manim animation.
Rendered with Manim.
Takeaway: Train the eye to see the slot, not the letters.
Ranking
Put in order
Put the moves of Worked example: a product of two chained powers into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Neither factor is inside the other; they are multiplied, so the product rule frames the whole calculation.
Worked example
The hardest routine shape on a Calculus I exam: a product where both factors need their own chain rule.
\[ y = (2x+1)^4(3x-5)^3 \]
The top-level structure is a product, so lead with the product rule
Why: Neither factor is inside the other; they are multiplied, so the product rule frames the whole calculation.
\[ f = (2x+1)^4, \qquad g = (3x-5)^3 \]
Differentiate the first factor with the generalized power rule
Why: Drop the exponent to 3, keep the base, then multiply by the derivative of the base, which is 2.
\[ f' = 4(2x+1)^3\cdot 2 = 8(2x+1)^3 \]
Differentiate the second factor the same way
Why: Drop the exponent to 2, keep the base, then multiply by the derivative of the base, which is 3.
\[ g' = 3(3x-5)^2\cdot 3 = 9(3x-5)^2 \]
Assemble with the product rule
Why: Derivative of the first times the second, plus the first times the derivative of the second.
\[ \frac{dy}{dx} = 8(2x+1)^3(3x-5)^3 + 9(2x+1)^4(3x-5)^2 \]
Factor out the lowest power of each bracket
Why: Both terms contain the first bracket cubed and the second bracket squared. Factoring is what turns this into a usable answer for finding horizontal tangents.
\[ = (2x+1)^3(3x-5)^2\Big[8(3x-5)+9(2x+1)\Big] = (2x+1)^3(3x-5)^2(42x-31) \]
Verify against the repeated roots of the original function
Why: The original has a fourth-order root at negative one half and a third-order root at five thirds, and a repeated root always forces a horizontal tangent there. Our factored derivative vanishes at both of those values, exactly as it must.
\[ \left.\frac{dy}{dx}\right|_{x=-1/2} = 0, \qquad \left.\frac{dy}{dx}\right|_{x=5/3} = 0 \]
Picture it
Animation
Shows: Each line of the worked example "a product of two chained powers", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The original has a fourth-order root at negative one half and a third-order root at five thirds, and a repeated root always forces a horizontal tangent there. Our factored derivative vanishes at both of those values, exactly as it must.
Pattern
Ask these in order, every time, before writing a single derivative:
Whichever rule frames the problem, every piece you differentiate along the way gets asked the same four questions again. That recursion is the whole skill.
Real world
Discussion prompt
Outside this lesson: where does The Chain Rule actually turn up? Name one concrete situation — a job, a piece of software someone ships, a decision somebody has to make — and say which part of Which rule do I reach for first? is doing the work in it.
Hint: Vague is the failure mode here. "Engineering" is not a situation; "deciding whether this build is fast enough to ship" is.
Answer:
That deck is about differentiating a function built inside another function. It covers spotting the outer and inner pieces, both notations for the chain rule, and the generalized power rule, then works through trigonometric, exponential, and radical outer functions, double and triple compositions, chains inside the product and quotient rules, and chain values read from a table, closing with a preview of applied rates. It targets the classic errors of dropping the inner derivative, differentiating the inside in place, and misreading which piece is the inner function.
Concept
Before you write the box around your answer, spend fifteen seconds on these.
The second one catches the differentiate-in-place error. The first one catches the dropped-factor error. Between them they catch nearly every chain-rule mistake students actually make.
Counterexample
Discussion prompt
Before you write the box around your answer, spend fifteen seconds on these.
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Answer:
The second one catches the differentiate-in-place error. The first one catches the dropped-factor error. Between them they catch nearly every chain-rule mistake students actually make.
Check
Rewrite the root before you differentiate, and check your answer against the four self-checks.
\[ y = \sqrt{x^2+9} \]
Check your understanding
What is the derivative?
Answer: A
Why: Rewriting as the one-half power gives one half times the quantity to the negative one half, times the inner derivative 2x. The one half and the 2 cancel, leaving x divided by the square root of x squared plus 9.
Connect it up
Draw it
One page, no notation unless you need it: draw how these connect — Spotting the Composition · The Rule Itself · Trig, Exponential, and Radical Outers · Deeper Chains · Chains Inside Other Rules · Chains Without a Formula. Put an arrow wherever one of them is what makes another possible, and label the arrow with why.
Recap
The chain rule is one sentence: the derivative of the outer function, with the inner function left untouched, times the derivative of the inner function.
\[ \frac{d}{dx}\Big[f\big(g(x)\big)\Big] = f'\big(g(x)\big)\cdot g'(x) \qquad\Longleftrightarrow\qquad \frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} \]
| When you see | Write |
|---|---|
| a bracket to the nth power | n times the bracket to the n minus 1, times the derivative of the bracket |
| sine of an expression | cosine of the same expression, times the derivative of the expression |
| e to an expression | the same exponential, times the derivative of the exponent |
| a square root of an expression | the derivative of the inside, over twice the root |
Next up: the derivatives of the trig, exponential, and logarithmic functions in full - where nearly every problem is a chain rule in disguise.
Want this taught 1-on-1? Alexander tutors Calculus I — $55/session, free consultation.