Math explained
The chain rule: inside, outside, and the inner derivative students forget, with ln x and eˣ worked
The chain rule as a habit: outside, inside, times the inside's derivative. One example worked, the forgotten factor named, with ln x and e^x.
The chain rule differentiates a function inside another function: if y = f(g(x)), then y' = f'(g(x)) · g'(x). In words: differentiate the outside with the inside left alone, then multiply by the derivative of the inside. The factor students forget is the last one. The habit that stops it is to write three lines before you differentiate: the outside, the inside, the inside's derivative. Here is the rule worked on a power, then on ln and eˣ.
The chain rule formula, and the three-line habit
In function notation the rule is y' = f'(g(x)) · g'(x). In Leibniz notation, with u standing for the inside, it is dy/dx = (dy/du)(du/dx): the two du's cancel as if they were fractions, which is a good way to remember the shape, though not a proof. The proof is in the textbook chapter and is not asked for in MCV4U.
The habit is this. Before you differentiate any composite function, write three short lines:
- outside: ( )⁴
- inside: 3x² − 5x
- inside': 6x − 5
Then the derivative is a product of what you have written: the outside's derivative with the inside left in the bracket, times the inside's derivative. The last factor is already on the page, so it cannot be forgotten. This is how to do the chain rule on paper under time pressure, and it costs about ten seconds a question.
How to tell a composition from a product
(x² + 1)³ has a function, x² + 1, inside a power. It is a composition, and it wants the chain rule. (x² + 1)(x³) has two functions beside each other, multiplied. It is a product, and it wants the product and quotient rules. The tell is one question: can you point at an inside? A bracket raised to a power, something under a root, inside a log, in an exponent, or inside sin or cos is an inside. Two pieces standing side by side with nothing wrapping them is a product.
Worked example: a power of a polynomial, line by line
Find y' for y = (3x² − 5x)⁴.
- Line 1, the three lines. Outside: u⁴. Inside: u = 3x² − 5x. Inside's derivative: 6x − 5.
- Line 2, the outside's derivative with the inside left alone. The derivative of u⁴ is 4u³, so this is 4(3x² − 5x)³.
- Line 3, the inside's derivative. 6x − 5, from line 1.
- Line 4, multiply. y' = 4(3x² − 5x)³ · (6x − 5).
That is the answer. An expanded form is not required, and expanding a cube of a binomial times another binomial is where errors breed; leave it factored unless a question asks otherwise.
The common wrong lines
Stopping at 4(3x² − 5x)³, the inner derivative forgotten. This is the error the page exists for. Here is a test that proves it wrong, on a case you can expand. Take y = (2x)². Expanded, that is 4x², whose derivative is 8x. The forgotten-factor method gives 2(2x) = 4x, half the truth. The missing half is the inside's derivative, which is 2. Whenever you doubt the rule, run (2x)²: if your method does not give 8x, a factor is missing.
Differentiating the inside first and putting it inside the outside, 4(6x − 5)³. The outside function acts on the inside as it is, not on the inside's derivative. The bracket keeps 3x² − 5x; the 6x − 5 is a separate factor multiplied on the outside.
The derivative of ln x, and ln of anything
The derivative of ln x is 1/x. The proof, in one sentence: ln x is the inverse of eˣ, and differentiating the equation e^(ln x) = x with the chain rule gives e^(ln x) · (ln x)' = 1, so (ln x)' = 1/x.
With the chain rule, ln of any function g(x) has derivative g'(x)/g(x): the inside's derivative over the inside. The three lines: outside ln( ), inside g(x), inside' g'(x); the outside's derivative is 1 over the inside, times the inside's derivative.
Worked: d/dx ln(x² + 1). Outside ln( ), inside x² + 1, inside' 2x. The derivative is (1/(x² + 1)) · 2x = 2x/(x² + 1).
The common wrong line is 1/(x² + 1) alone, the 2x forgotten. It is the same missing factor as before, in a new coat. The three-line habit catches it the same way.
The derivative of e^x, and e to anything
The derivative of eˣ is eˣ: it is the one function that is its own derivative, which is the reason e is the base calculus prefers. With the chain rule, e raised to any function g(x) has derivative e^(g(x)) · g'(x): the same exponential, times the derivative of the exponent.
Worked: d/dx e^(3x). Outside e^( ), inside 3x, inside' 3. The derivative is e^(3x) · 3 = 3e^(3x).
The common wrong line is 3x · e^(3x − 1), which treats eˣ like a power of x and applies the power rule. The power rule is for a variable base and a constant exponent, xⁿ. Here the base is the constant e and the exponent is what varies. The two rules are opposites, and the test is which part has the x in it.
Siblings to try cold
Cover the examples. Write the three lines first for each, then multiply.
- y = (2x³ + 7)⁵
- y = ln(5x − 2)
Check
- y' = 5(2x³ + 7)⁴ · 6x² = 30x²(2x³ + 7)⁴. If you wrote 5(2x³ + 7)⁴ alone, the inner derivative 6x² is missing; run the (2x)² test.
- y' = 5/(5x − 2). If you wrote 1/(5x − 2), the 5 is missing.
Either miss is tonight's card, with the three lines on the front and the answer on the back.
When the chain is longer than two
Some functions have an inside inside an inside. sin(e^(2x)) has three layers: sin on the outside, e^( ) in the middle, 2x innermost. Work from the outside in and write each link: the derivative is cos(e^(2x)) · e^(2x) · 2 = 2e^(2x) cos(e^(2x)). Each factor is one layer's derivative with everything inside it left alone. Three lines become five, and the habit is the same: write every link before you multiply.
Where this sits in the course, and where it goes next
In MCV4U this is idea 8 of 24, Chain rule. Before it is idea 7, Product and quotient rules. After it is idea 9, Implicit differentiation, and then idea 10, Derivatives of exponential and logarithmic functions, which is where ln x and eˣ arrive in the course; this page brings them forward because the two special cases are the chain rule's best illustrations. The MCV4U course map shows all 24 ideas in teaching order.
In a first-year Calculus I course this is idea 6 of 26, The chain rule, between idea 5, Power, product and quotient rules, and idea 7, Implicit differentiation, with idea 8, Derivatives of exponential and logarithmic functions, after. First-year calculus, what changes is written for the Grade 12 student about to meet it, and the complete list of derivative rules puts this rule beside the others.
What comes next is the chain rule in disguise. Implicit differentiation and related rates is the chain rule with y as the inside, which is where dy/dx appears as a factor, and related rates is the same with t: every time you differentiate a variable that depends on time, its rate is the inner derivative. If you own the three-line habit, both of those ideas are already half learned.
Practise chain-rule and product-rule questions mixed, not in blocks. Rohrer and Taylor (2007) found that students who practised shuffled problem types scored higher on a later test than students who practised in blocks, because the shuffled set makes you decide which rule applies, which is the inside-or-beside question above. Practise the rules mixed has the method, and worked examples, then practice problems has the order; Sweller and Cooper (1985) is the reason the example here comes before the siblings, and Booth and colleagues (2013) is the reason the forgotten-factor line is shown and explained rather than left out.
The chain rule on one screen
- The rule: y = f(g(x)) gives y' = f'(g(x)) · g'(x); in Leibniz form, dy/dx = (dy/du)(du/dx).
- The three-line habit: outside, inside, inside's derivative, written before you differentiate.
- Inside or beside: an inside means the chain rule; side by side means the product rule.
- ln of anything: g'(x)/g(x). So d/dx ln(x² + 1) = 2x/(x² + 1).
- e to anything: e^(g(x)) · g'(x). So d/dx e^(3x) = 3e^(3x).
- The (2x)² test: its derivative is 8x; a method that gives 4x has dropped the inner derivative.
Questions students ask
What is the chain rule in simple terms?
When one function is inside another, differentiate the outside function while leaving the inside as it is, then multiply by the derivative of the inside. For (3x² − 5x)⁴, the outside is the fourth power and the inside is 3x² − 5x, so the derivative is 4(3x² − 5x)³ times 6x − 5.
How do I know when to use the chain rule?
Ask whether you can point at an inside: a bracket raised to a power, something under a root, inside a log, in an exponent, or inside sin or cos. If yes, it is a composition and the chain rule applies. Two functions multiplied side by side is the product rule instead.
What is the derivative of ln x?
1/x. For ln of a function, the derivative is the function's derivative over the function: d/dx ln(x² + 1) = 2x/(x² + 1). The most common slip is to forget the derivative of the inside and write 1/(x² + 1).
What is the derivative of e^x?
eˣ itself. For e raised to a function, multiply by the derivative of the exponent: d/dx e^(3x) = 3e^(3x). Do not use the power rule; the base is constant and the exponent is what varies, which is the opposite of xⁿ.
Why do I keep forgetting the inner derivative?
Because the outside step already looks like a finished derivative. Write the inside and its derivative on their own lines before you differentiate anything, so the last factor is already on the page waiting to be multiplied in. The habit is three lines, and it takes ten seconds.
Put tonight's studying on rails
YSR Studies turns your notes, lectures and course into cards that come back before you forget, a tutor that makes you try first, and a map of what you know. Free, five hours a month, no card asked.
Read next
- MathImplicit differentiation and related rates: the one idea behind both, worked on a curve and on the ladder problem
- MathProduct and quotient rules: one example worked line by line for each, and the sign error in the quotient rule that costs the mark
- MathDerivative rules: the complete list, when each one applies, one example worked line by line, and the two rules students confuse
- CoursesMCV4U Calculus and Vectors: the course map (24 ideas from the limit to planes in space), the chain-rule and related-rates traps, and how to study it
Sources
- OpenStax (2016). Calculus Volume 1, chapter 3, Derivatives: 3.6 The Chain Rule; 3.9 Derivatives of Exponential and Logarithmic Functions. OpenStax, Rice University. CC BY-NC-SA 4.0. Cited, not quoted; no problem reproduced.
- Sweller, J., & Cooper, G. A. (1985). The use of worked examples as a substitute for problem solving in learning algebra. Cognition and Instruction, 2(1), 59–89. https://doi.org/10.1207/s1532690xci0201_3
- Rohrer, D., & Taylor, K. (2007). The shuffling of mathematics problems improves learning. Instructional Science, 35(6), 481–498. https://doi.org/10.1007/s11251-007-9015-8
- Booth, J. L., Lange, K. E., Koedinger, K. R., & Newton, K. J. (2013). Using example problems to improve student learning in algebra: Differentiating between correct and incorrect examples. Learning and Instruction, 25, 24–34. https://doi.org/10.1016/j.learninstruc.2012.11.002
- YSR Studies (2026). The MCV4U course map: the chain rule is idea 8 of 24 and the exponential and logarithmic derivatives idea 10; the Calculus I map: the chain rule is idea 6 of 26 and the exponential and logarithmic derivatives idea 8.