| The chain rule | |
|---|---|
| In function notation |
Lesson
The theory — The Chain Rule
If u = g(x) and y = f(u), the rate of the whole chain is the product of the links' rates, dy/dx = f′(g(x))·g′(x). Each rate is taken where its link is working, so the outer rate is evaluated at u = g(x), not at x. A longer chain multiplies one more rate per link.
What each symbol means
u- the value the inner link hands on, u = g(x)
w- in a three-link chain, the value the middle link hands on
Where the formula comes from
- Break the change into links. Move x on by Δx. The inner link moves u by Δu, the outer moves y by Δy, and as long as Δu is not 0 the ratio for the whole chain splits into the two links' ratios. On the page that is the stretches of the bands multiplying.
- Let Δx shrink. Because g is continuous at x, Δu shrinks with it. The inner ratio tends to g′(x) and the outer one to f′ at the point the outer link is working, u = g(x). The limit of a product is the product of the limits.
- The case the split hides. If Δu is 0 for some small Δx, the first line divides by zero. The careful proof gives the outer ratio the value f′(u) whenever Δu = 0. Then the product holds for every Δx, and its limit is the same.
- Assumes
- Each link has a derivative at the point it works at. Where one does not, as √u has none at 0, the rule says nothing, and the page prints the chain as undefined there.
Problems solved in full
-
A power of a linear expression 3 steps
Differentiate y = (3x + 1)⁴ and give the slope at x = 0.
-
Name the links and their rates. The inner link is the linear part, the outer one is the fourth power:
-
Multiply, outer rate first, and write the result as an exam would, with the constant in front:
-
At x = 0 the inner value is 1:
Answer
dy/dx = 12(3x + 1)³, and 12 at x = 0. The 3 is the step everyone drops: the outer rate alone would give 4(3x + 1)³, a quarter of the true slope. The page shows the two rates as 3 and 4 and their product as 12.
-
-
A sine of a square 3 steps
Differentiate y = sin(x²) and give the slope at x = 1.
Show solution
-
The links and their rates:
-
Multiply. The cosine is taken at u = x², where the outer link is working, not at x:
-
At x = 1:
Answer
dy/dx = 2x cos(x²), and 2 cos 1 ≈ 1.0806 at x = 1. The page prints the outer rate there as 0.5403, which is cos 1, because u = x² is 1 at that point.
-
-
Where e^(−x²) is flat 3 steps
Differentiate y = e^(−x²), find where its slope is zero, and give the slope at x = 1.
Show solution
-
The links and their rates. e to a power is its own derivative:
-
Multiply:
-
The exponential is never zero, so only the factor −2x can vanish:
Answer
dy/dx = −2x e^(−x²): flat only at x = 0, and −2/e ≈ −0.7358 at x = 1. Left of 0 the slope is positive and right of it negative, so x = 0 is the top of the curve.
-
-
A logarithm of a sum 3 steps
Differentiate y = ln(x² + 1) and give the slope at x = 1.
Show solution
-
The links and their rates:
-
Multiply:
-
At x = 1 the inner value is 2:
Answer
dy/dx = 2x/(x² + 1), and exactly 1 at x = 1. The page prints the outer rate as 0.5, which is 1/u at u = 2.
-
-
A negative power 3 steps
Differentiate y = 1/(2x − 1)³ and give the slope at x = 1.
Show solution
-
Write it as a power first; then the links and their rates follow as before:
-
Multiply and turn the negative power back into a fraction:
-
At x = 1 the inner value is 1:
Answer
dy/dx = −6/(2x − 1)⁴, and −6 at x = 1. Written as a power, a quotient with a constant on top needs no quotient rule at all.
-
-
The cube of a sine 3 steps
Differentiate y = sin³x and give the slope at x = π/4.
Show solution
-
sin³x is a cube of sin x, so the power is the outer link and the sine the inner one:
-
Multiply:
-
At π/4 the sine and the cosine are both √2/2:
Answer
dy/dx = 3 sin²x cos x, and 3√2/4 ≈ 1.0607 at x = π/4. Read sin³x as sin(x³) and you have built a different chain, with the links the other way round.
-
-
Three links 3 steps
Differentiate y = e^(sin(x²)) and give the slope at x = 1.
Show solution
-
Three links, three rates, each taken where its link is working:
-
Multiply all three, outer first:
-
At x = 1:
Answer
dy/dx = 2x cos(x²) e^(sin(x²)), about 2.5068 at x = 1. One more link is one more factor, and the method does not change.
-
-
How many presses of cos? 4 steps
A calculator in radians shows 1, and you keep pressing cos. Near p = 0.739085…, where cos p = p, each press multiplies the error by cos′(p) = −sin p = −0.6736. Estimate how many presses bring the display within 10⁻⁶ of p, then check the estimate. Press From x = 1: three presses take 1 to 0.6543, and the slope of the three-link chain there is −0.3273.
Show solution
-
The error before the first press:
-
n presses are an n-link chain, and near p every link has the same rate, so the chain rule multiplies n equal factors:
-
Ask for that to fall below 10⁻⁶ and take logarithms:
-
The page's three presses test the estimate early, where it is still rough: it predicts −0.0797 and the display is out by −0.0848, because the first presses happen far from p.
Answer
32 presses. The estimate says 31.57, so 32, and running the iteration agrees: after 31 presses the error is 1.286×10⁻⁶ and after 32 it is 8.664×10⁻⁷. Each error divided by the one before is −0.7619 at the first press and −0.5960 at the second, and settles on −0.6736 as the presses close in. The page stops at three links.
-
Learning path
Differentiation: how rates combine
References (2)
- The rule in both notations the page uses, h′(x) = f′(g(x))g′(x) and dy/dx = (dy/du)·(du/dx), the advice to work “from the outside in, taking one derivative at a time”, the warning that “we never evaluate a derivative at a derivative” (the page's derivOfDeriv slip), and a chain of three links (Example 3.55, cos⁴(7x² + 1)): G. Strang and E. Herman, Calculus Volume 1, OpenStax (2016), section 3.6, “The Chain Rule”.
- The derivative of ln x proved from the identity e^y = x, differentiated implicitly (Theorem 3.15), the argument insight block 3 makes as a chain e^(ln x) = x: G. Strang and E. Herman, Calculus Volume 1, OpenStax (2016), section 3.9, “Derivatives of Exponential and Logarithmic Functions”.