Study Companion: Programme F.12 — Differentiation
One idea runs through this whole programme: a derivative is what the ratio of two small changes settles on as the changes shrink. Every rule in it — the power rule, the product rule, the chain rule — is found the same way: nudge the input by a small amount, look at the picture of what the output does, and throw away only the pieces that vanish faster than the nudge.
This file answers why. The rules, tables and drill are in the companion reference sheet; every rule there links back to the unit here that earns it.
How to use this companion
Each unit is built as an argument: a real situation and a question you cannot yet answer, the attempt a sensible person would make first, the picture that settles it, a check with actual numbers, and only then the rule. Read it once front to back. The Narration spine at the end of each unit summarises what the video shows and in what order.
A note on notation. A small but finite change is written with \delta — \delta x is a real number, like 0.01. The derivative, the value a ratio of such changes settles on, is written \frac{dy}{dx}. Keep the two apart: \delta x is something you can compute with; \frac{dy}{dx} is the number it leads to.
Unit 01: Speed at an Instant
The problem
A car pulls away from a set of traffic lights with constant acceleration. For the first few seconds its distance from the stop line is
with t in seconds. Three seconds after the lights change, the speedometer shows a number. What number, and what does it mean?
Speed is distance travelled divided by time taken. But at the instant t=3 the car travels no distance in no time, and \frac{0}{0} is not a number. "Speed at an instant" sounds like a contradiction: change needs two moments, and an instant is one.
First attempt
Use two moments. Between t=3 and t=4 the car goes from s=18 m to s=32 m, so it covers 14 m in 1 s: an average speed of 14 m/s.
On the distance–time graph, that average is the gradient of the straight line joining the two points: the rise divided by the run.
A straight line has the same gradient everywhere: any two points on it give similar right-angled triangles, and similar triangles have the same ratio of rise to run. That is why "the gradient of a line" is one number.
The trouble is that the car's graph is not a straight line. Try a different window and you get a different answer: between t=2.9 and t=3 the average is 11.8 m/s. The car is speeding up inside every window, so every window gives a slightly different average, and none of them is "the speed at 3 s". You could lay a ruler against the curve at P by eye and measure its slope, and you would get something near 12 — but the answer would depend on your eye.
The picture
Keep the first point P at t=3, and slide the second point Q towards it. Call the width of the window \delta t and the rise across it \delta s.
As Q slides down the curve towards P, the line through P and Q turns, and settles onto a single line that just touches the curve at P: the tangent. Both the rise \delta s and the run \delta t shrink to nothing. Their ratio does not. It settles on the gradient of the tangent.
That is the resolution of the paradox. The speed at an instant is not a ratio measured at an instant. It is the number the average speeds home in on as the window shrinks.
Check it with numbers
| \delta t (s) | s(3+\delta t) (m) | \delta s (m) | \delta s/\delta t (m/s) |
|---|---|---|---|
| 1 | 32 | 14 | 14 |
| 0.1 | 19.22 | 1.22 | 12.2 |
| 0.01 | 18.1202 | 0.1202 | 12.02 |
| 0.001 | 18.012002 | 0.012002 | 12.002 |
The averages settle on 12 m/s. The speedometer reads 12 m/s, about 43 km/h.
The rule it gives
The table has a pattern: the excess over 12 is 2, then 0.2, then 0.02 — always 2\,\delta t. The algebra shows why:
The 2\,\delta t vanishes as the window shrinks, leaving 12. Nothing here depended on the choice t=3: at any time t,
This is differentiation from first principles. For any curve y=f(x):
- nudge x by \delta x;
- find \delta y=f(x+\delta x)-f(x);
- divide by \delta x;
- let \delta x\to0.
The value \frac{\delta y}{\delta x} settles on is the derivative of y with respect to x, written
and it is the gradient of the tangent to the curve at that point. Finding it is differentiation. The derivative is itself a function of x: here, \frac{ds}{dt}=4t gives the speed at every moment.
The assumption doing the work is that the ratio does settle — that the curve is smooth at the point. A graph with a sharp corner has no single tangent there, and no derivative.
For a straight line y=mx+c the ratio never needed to settle: \frac{\delta y}{\delta x}=m for every window, so \frac{dy}{dx}=m.
Worked example
Differentiate y=x^2+4x from first principles, and find the gradient at x=1.5.
So \frac{dy}{dx}=2x+4, and at x=1.5 the gradient is 2(1.5)+4=7.
Check: with \delta x=0.1 the ratio is 7.1; with \delta x=0.01 it is 7.01. The excess is \delta x each time, exactly as the algebra says.
Where this shows up
A digital speedometer does exactly what the table does. A sensor at the wheel sends a pulse for each fraction of a turn; the electronics count the pulses in a short window, convert them to distance, and divide by the window's length. That is \frac{\delta s}{\delta t} with a small \delta t — a first-principles derivative, recomputed several times a second.
And the gradient of a straight line is how a road's steepness is specified: a road that rises 6 m over 120 m of horizontal distance has gradient \frac{6}{120}=0.05, a "5 % grade", the same all along the straight.
Narration spine. Drive the car away from the lights while its distance graph draws itself. Ask for the speed at t=3 and pose the 0/0 problem. Take a one-second window, draw its rise and run, then slide the second point down the curve towards the first while the ratio updates; show the table settling on 12. Name the tangent and the derivative, then let the tangent ride along the curve.
Unit 02: Growing Squares and Cubes — the Power Rule
The problem
A square steel plate, 300 mm on each side, is heated by 50\,{}^\circC. Steel expands by about 12 millionths of its length per degree, so each side grows by
By how much does the plate's area grow? More generally: when x changes a little, how much does x^2 change?
First attempt
"The extra area is a little square of side 0.18 mm": 0.18^2=0.0324 mm². Draw it and the mistake is obvious — the side grows along two edges, not just at the corner. The answer is thousands of times too small.
You could instead compute 300.18^2-300^2=108.0324 mm² directly. That is correct, but it explains nothing and would have to be redone for every plate.
The picture
Draw the plate as a square of side x, so its area is x^2. Grow the side by \delta x.
The new area arrives in three pieces: a strip x\,\delta x down the right-hand side, another strip x\,\delta x along the bottom, and a corner square \delta x^2. So
Now compare the pieces as \delta x shrinks. Halve \delta x, and each strip halves — but the corner quarters. The strips shrink like \delta x; the corner shrinks like \delta x^2, much faster. Divide by \delta x:
and the corner's contribution, \delta x, is the only part that disappears as the nudge shrinks. What survives is the two strips: the rate at which a square's area grows is twice its side — two strips, each as long as the side.
Check it with numbers
Side x=3, nudge \delta x=0.01: each strip has area 3\times0.01=0.03, and the corner has area 0.01^2=0.0001 — three hundred times smaller than a strip. The change in area is 0.0601, and
Shrinking the nudge: \delta x=0.1 gives 6.1; 0.01 gives 6.01; 0.001 gives 6.001. The ratio settles on 6=2\times3.
For the plate: the strips contribute 2\times300\times0.18=108 mm², the corner 0.0324 mm². The exact growth is 108.0324 mm², and the strips alone get it right to within three hundredths of a square millimetre.
The rule it gives
A cube. The same picture in three dimensions: a cube of side x has volume x^3. Grow the side by \delta x and the new volume comes in three kinds of piece:
| Piece | How many | Volume of each |
|---|---|---|
| Slab on a face | 3 | x\cdot x\cdot\delta x |
| Bar along an edge | 3 | x\cdot\delta x\cdot\delta x |
| Corner cube | 1 | \delta x\cdot\delta x\cdot\delta x |
After dividing by \delta x, only the three slabs survive the shrinking: \frac{d}{dx}\left(x^3\right)=3x^2. With x=3 and \delta x=0.01: slabs 3\times0.09=0.27, bars 3\times0.0003=0.0009, corner 0.000001; total 0.270901, and 0.270901/0.01=27.0901, settling on 27=3\times3^2.
Every positive whole power. The list so far — x\to1, x^2\to2x, x^3\to3x^2 — suggests "the old power comes down in front, and the new power is one less". The reason is the same picture in more dimensions. Write
Expanding means choosing either x or \delta x from each bracket and multiplying the choices together:
- Choose x every time: x^n — the original value.
- Choose \delta x from exactly one bracket: there are n brackets to choose it from, and each choice gives x^{n-1}\,\delta x. Together, n\,x^{n-1}\,\delta x — the "slabs".
- Choose \delta x from two or more brackets: every such term contains \delta x^2 — the "bars and corners" — and still carries a \delta x after dividing by \delta x, so it vanishes.
Therefore
for every positive whole number n. This is the power rule.
Two more pictures. The rule also holds for negative and fractional powers, and two of them have pictures of their own.
\frac1x. Draw a rectangle of width x and height \frac1x: its area is always 1. Widen it by \delta x, and its height must drop to keep the area 1. The area gained down the right-hand side, about \frac1x\,\delta x, must equal the area lost along the top, about x times the drop in height. So the height changes by about -\frac{\delta x}{x^2}, and
which is the power rule with n=-1. Check at x=2, \delta x=0.01: \left(\frac1{2.01}-\frac12\right)/0.01=-0.2488, settling on -\frac14.
\sqrt x. A square of area x has side \sqrt x. Increase the area by \delta x; the side grows by \delta(\sqrt x), and the new area is two strips of \sqrt x\,\delta(\sqrt x) (plus a vanishing corner). So 2\sqrt x\,\delta(\sqrt x)\approx\delta x, and
the power rule with n=\frac12. Check at x=9: \left(\sqrt{9.01}-3\right)/0.01=0.16662, settling on \frac16.
The rule holds for every real power n (with x>0); Unit 09 proves it in one line once logarithms are available.
Constants, multiples and sums.
- A constant, y=c, is a horizontal line: nudging x changes nothing, so \frac{dy}{dx}=0.
- Multiplying by a constant, y=a\,x^n, stretches every rise by a and leaves every run alone, so every gradient is multiplied by a: \frac{dy}{dx}=a\,n\,x^{n-1}.
- A sum, y=u+v, is two heights stacked. Nudge x and each height changes; the stack changes by the sum of the two changes. So \frac{d}{dx}(u+v)=\frac{du}{dx}+\frac{dv}{dx}.
Together these differentiate any polynomial term by term.
Worked example
Differentiate y=2x^4-3x^2+5x-7 and find the gradient at x=2.
Term by term: \frac{d}{dx}(2x^4)=8x^3, \frac{d}{dx}(-3x^2)=-6x, \frac{d}{dx}(5x)=5, and the constant -7 gives 0:
At x=2: 8(8)-6(2)+5=64-12+5=57.
For a long polynomial, nested form saves multiplications: 8x^3+0x^2-6x+5=\big((8x+0)x-6\big)x+5. At x=2: 8\times2=16; 16\times2-6=26; 26\times2+5=57.
Numerical check: \big(y(2.001)-y(2)\big)/0.001=57.045, settling on 57.
Where this shows up
Engineers quote two thermal expansion coefficients for a solid: \alpha for length and \beta for volume, and for most materials \beta\approx3\alpha. That factor of 3 is the three slabs on the cube.
A steel cube 200 mm on a side, heated by 50\,{}^\circC, grows \delta L=200\times12\times10^{-6}\times50=0.12 mm on each side. Its volume grows by about
The exact growth is 14\,408.6 mm³; the missing 8.6 mm³ is the bars and the corner, which are why \beta=3\alpha is an approximation — an excellent one, because \alpha\,\Delta T is tiny.
Narration spine. Show the square plate with braces x on two sides. Offer the "little square" guess and strike it out. Grow the side by \delta x so two green strips and a red corner appear; pull the pieces apart and build \delta(x^2)=2x\,\delta x+\delta x^2 from copies of them. Turn the labels into 3, 0.01, 0.03 and 0.0001. Shrink \delta x with everything on screen, watch the corner vanish first, divide by \delta x, and slide x to show the rule holds at every size. Repeat briefly with the cube's slabs, bars and corner, then collect the pattern into the power rule.
Unit 03: Rates of Rates — Higher Derivatives
The problem
A test rig moves a carriage along a straight track. Its position is
The carriage never stops, but it slows down and then speeds up again. When is it slowest? How hard is it being pushed at each moment? And what does a passenger feel when that changes?
First attempt
Look at the distance graph and judge. You can see that it gets steeper towards the end, but judging how fast the steepness changes by eye — the curvature — is hopeless.
The picture
Differentiate, and draw the derivative's graph directly beneath the original, with the same time axis. Do it again.
At every moment, the height of each graph is the gradient of the graph above it. The velocity graph turns the question "how steep is s?" into "how high is v?", which the eye can read. And the next graph answers "how steep is v?" in the same way.
Check it with numbers
| t (s) | s (m) | v (m/s) | a (m/s²) |
|---|---|---|---|
| 0 | 0 | 4 | -6 |
| 1 | 2 | 1 | 0 |
| 2 | 4 | 4 | 6 |
| 3 | 12 | 13 | 12 |
The acceleration is zero at t=1 — exactly where the velocity stops falling and starts rising, so the carriage is slowest there, at 1 m/s. On the distance graph, t=1 is where the curve is momentarily straightest: it changes from bending one way to bending the other.
A first-principles check on one entry: \big(s(2.001)-s(2)\big)/0.001=4.003, settling on v(2)=4.
The rule it gives
Differentiating a derivative gives the second derivative:
and so on for \frac{d^3y}{dx^3} and beyond. The prime notation says the same thing more briefly: if y=f(x), then f'(x), f''(x), f'''(x) ("f prime", "f double prime", "f triple prime") are the first, second and third derivatives.
Each differentiation divides by the unit of the input: metres become metres per second, then metres per second squared, then metres per second cubed. For motion these are position, velocity, acceleration and jerk.
Worked example
For y=4x^3-2x^2+x-9:
At x=1: \frac{dy}{dx}=12-4+1=9 and \frac{d^2y}{dx^2}=24-4=20.
Where this shows up
The rig's jerk is a constant 6 m/s³. Lift and railway engineers limit jerk as well as acceleration, because a sudden change of acceleration is what a passenger feels as a jolt.
A second, static example: the bending of a beam. For a beam of stiffness EI with deflection y(x), the bending moment is M=EI\,\frac{d^2y}{dx^2}. A cantilever of length L fixed at x=0 and carrying a uniform load w deflects by
Differentiate twice:
so M=-\frac{w}{2}(L-x)^2. With w=2 kN/m and L=3 m, the moment at the wall is -\frac22\times3^2=-9 kN·m (hogging) — exactly the value a free-body diagram gives, wL\times\frac L2.
Narration spine. Draw the carriage moving along its track above its distance graph. Build the velocity graph beneath it, point by point, from slopes of the graph above, with one vertical time line through all the graphs. Do it again for acceleration. Stop the time line at t=1: velocity at its lowest, acceleration crossing zero, the distance curve at its straightest. End on the stack of four graphs.
Unit 04: The Slope of a Sine Wave
The problem
A crank of radius r turns about its shaft. The height of the crank pin above the shaft is h=r\sin\theta. As the crank turns, how fast does the pin rise, per radian of turn?
The graph of \sin\theta suggests an answer: it is steepest at \theta=0, flat at the top, steepest downwards at \theta=\pi. Plot its slope and you get another wave, one that looks remarkably like \cos\theta. Is it exactly \cos\theta, and why?
First attempt
Measure slopes numerically at \theta=1 (radians):
| \delta\theta | \frac{\sin(1+\delta\theta)-\sin1}{\delta\theta} |
|---|---|
| 0.1 | 0.4974 |
| 0.01 | 0.5361 |
| 0.001 | 0.5399 |
and \cos1=0.5403. Convincing — but a table can only show that the slopes approach \cos\theta, never why.
The picture
Go back to where sine comes from: a point P on a circle of radius 1, at angle \theta. Its height is \sin\theta and its horizontal distance from the centre is \cos\theta.
Turn the angle a little, by \delta\theta. The point moves along the circle to Q, a distance \delta\theta — in radians, arc length is radius times angle, and the radius is 1.
Zoom in on the stretch from P to Q. It is almost straight, and it points at right angles to the radius OP. So it forms a tiny right-angled triangle whose hypotenuse is \delta\theta, whose vertical side is the change in height, \delta(\sin\theta), and whose horizontal side is the change in \cos\theta.
That tiny triangle is the big triangle O–P–foot, turned through a right angle. Turning a triangle through 90^\circ does not change its shape, so the two are similar. Matching the sides: the tiny triangle's vertical side corresponds to the big triangle's horizontal side. So
And the tiny triangle's horizontal side corresponds to the big triangle's vertical side, \sin\theta — but as P climbs anticlockwise, it moves left, so \cos\theta decreases:
Making it exact. The picture's one approximation is "the arc from P to Q is almost straight". Replace the arc by its chord. The chord is the base of an isosceles triangle with two sides of length 1 and apex angle \delta\theta, so its length is exactly 2\sin\frac{\delta\theta}2, and it points at right angles to the radius halfway between P and Q, at angle \theta+\frac{\delta\theta}2. Its vertical part is therefore
The first factor goes to \cos\theta. The second is "chord over arc", and everything now rests on showing it goes to 1.
Why \frac{\sin x}{x}\to1. Draw an angle x at the centre of a unit circle, and three nested regions: the triangle inside the sector, the sector, and the triangle formed by extending the radius to meet the tangent line at the starting point.
O is the centre, P is on the circle on the starting line, and A is on the circle at angle x, so its height above OP is \sin x. Extend the radius OA until it meets the tangent to the circle at P, at T; then PT=\tan x. The triangle OAP (join A to P) sits inside the sector OAP, which sits inside the triangle OTP.
Their areas are, in order, \frac12\sin x, \frac12x and \frac12\tan x, and each region contains the one before it:
Divide through by \frac12\sin x and take reciprocals (which reverses the inequalities):
As x\to0, \cos x\to1, and \frac{\sin x}{x} is trapped between \cos x and 1, so it must go to 1 as well.
This is where radians earn their place: the sector's area is \frac12x only when x is measured in radians. In degrees, \frac{\sin30^\circ}{30}=0.0167, nowhere near 1, and every derivative of a trigonometric function would carry a stray factor of \frac{\pi}{180}.
Check it with numbers
| x | \sin x | \frac{\sin x}{x} | \cos x |
|---|---|---|---|
| 0.5 | 0.479426 | 0.958851 | 0.877583 |
| 0.1 | 0.099833 | 0.998334 | 0.995004 |
| 0.01 | 0.009999833 | 0.9999833 | 0.99995 |
In every row \cos x<\frac{\sin x}{x}<1, and the gap closes.
And the cosine's slope at \theta=1: with \delta\theta=0.001, \frac{\cos1.001-\cos1}{0.001}=-0.84174, against -\sin1=-0.84147.
The rule it gives
Worked example
Differentiate y=3\sin x-2\cos x:
At x=0 the gradient is 3; at x=\frac\pi2 it is 2.
Where this shows up
The crank pin's height is h=r\sin\theta, so it rises at r\cos\theta metres per radian. For a crank of radius 0.15 m at \theta=60^\circ that is 0.15\times0.5=0.075 m per radian — half the rate it has when the crank is horizontal.
If the crank turns at \omega radians per second, each radian takes \frac1\omega seconds, so the pin rises at r\omega\cos\theta metres per second. A 0.05 m crank at 3000 rpm turns at \omega=314.16 rad/s, and as it passes horizontal its pin is moving vertically at 0.05\times314.16=15.7 m/s. (Multiplying the two rates like this is the chain rule of Unit 08.)
Narration spine. Turn a radius around the unit circle while the sine wave traces itself beside it. Draw the slope of the sine wave as a second wave and ask whether it is exactly cosine. Nudge the angle by \delta\theta and zoom in: the tiny triangle appears, turned through a right angle from the big one. Match its sides to the big triangle's to read off \cos\theta and -\sin\theta. Then justify "the arc is straight" with the three nested areas squeezing \frac{\sin x}{x} between \cos x and 1 as x shrinks.
Unit 05: The Function That Is Its Own Rate — e^x
The problem
A bacterial culture doubles every hour. Starting from 1 thousand cells, after t hours there are N=2^t thousand. How fast is it growing at t=5 h?
Here is what we already know about the answer: each cell divides on its own schedule, so twice as many cells means twice the rate of growth. The rate must be proportional to the size: \frac{dN}{dt}=(\text{some constant})\times N. What is the constant?
First attempt
Try the power rule: \frac{d}{dt}2^t=t\cdot2^{t-1}? That is wrong — the power rule is for a variable raised to a fixed power, and here the variable is in the exponent. Test it: at t=0 it gives 0, but a population of 1 thousand that doubles every hour is certainly growing at t=0.
The picture
Nudge t by \delta t:
The change is the current size, 2^t, times a factor \left(2^{\delta t}-1\right) that does not depend on t at all. Dividing by \delta t:
On the graph, this says every tangent line has the same shape of triangle underneath it: at every point, the slope is the same multiple of the height. Draw the tangent at any point of y=2^t, run it down to the t-axis, and it meets the axis the same horizontal distance behind the point, wherever the point is.
Check it with numbers
The constant is whatever \frac{a^{h}-1}{h} settles on as h shrinks:
| Base a | h=0.001 | h=0.0001 |
|---|---|---|
| 2 | 0.69339 | 0.69317 |
| 3 | 1.09922 | 1.09867 |
| 10 | 2.30524 | 2.30285 |
For base 2 the constant is about 0.6931, so the culture grows at 0.6931\times2^t thousand cells per hour; at t=5 that is 0.6931\times32=22.18 thousand per hour. For base 2, each tangent meets the axis \frac1{0.6931}=1.443 hours behind the point.
The rule it gives
The constant is below 1 for base 2 and above 1 for base 3, so somewhere between them is a base for which it is exactly 1. That base is called e:
(With a=e the two rows give 1.0005 and 1.00005.) For this base, the slope of the graph at every point equals its height:
and every tangent to y=e^x meets the x-axis exactly one unit behind the point. This is what makes e the natural base: it is the growth whose rate is itself, with no constant attached.
A second description of e^x, reconciled. e^x can also be written as the series
Differentiate term by term with the power rule: 1\to0, x\to1, \frac{x^2}{2!}\to x, \frac{x^3}{3!}\to\frac{x^2}{2!}, and so on — each term becomes the one before it, and the series reproduces itself. So the series is also a function equal to its own derivative, equal to 1 at x=0; the two descriptions agree.
The constant 0.6931 for base 2 is \ln2, and 1.0986 for base 3 is \ln3. Unit 09 shows why.
Worked example
y=5e^x-x^3 gives \frac{dy}{dx}=5e^x-3x^2; at x=0 the gradient is 5.
Where this shows up
Anything whose rate of change is proportional to its current amount is exponential: a population, money at continuous interest, the charge on a capacitor discharging through a resistor, the temperature difference of a cooling object. The rule "rate proportional to amount" and the function e^x are the same fact seen from two sides. The capacitor is worked through in Unit 08.
Narration spine. Show the doubling bars of the population. Write the nudge 2^{t+\delta t}=2^t\cdot2^{\delta t} and highlight that the second factor ignores t. Draw tangents at several points of y=2^t, each meeting the axis the same distance behind. Tabulate \frac{a^h-1}{h} for bases 2 and 3, slide the base with a tracker until the constant is 1, and name that base e; its tangents meet the axis exactly one unit back.
Unit 06: The Product Rule — a Growing Rectangle
The problem
A charger is pushing current into a battery. At one instant the voltage is V=12 V and rising at 0.5 V/s, while the current is I=2 A and falling at 0.1 A/s. The power delivered is P=VI. Is the power rising or falling, and how fast?
First attempt
"The rate of a product is the product of the rates":
Check the units: \frac{\text{V}}{\text{s}}\cdot\frac{\text{A}}{\text{s}}=\frac{\text{W}}{\text{s}^2}. A rate of change of power must be in watts per second, so this cannot be right. Test it on something known, too: y=x\cdot x would give 1\times1=1, but \frac{d}{dx}x^2=2x. The guess is wrong.
The picture
A product of two positive quantities is the area of a rectangle. Draw P=VI as a rectangle V wide and I high.
Nudge time a little. The width grows by \delta V and the height by \delta I, and the new area comes in three pieces: a strip V\,\delta I along the top, a strip I\,\delta V down the side, and a corner \delta V\,\delta I:
The corner is a product of two small changes, so like the corner of the square in Unit 02 it vanishes faster than either strip. Divide by \delta t and let it shrink:
Each factor's change is weighted by the other factor: the top strip is as long as V, the side strip as tall as I. The wrong guess multiplied the two changes together — which is the corner, the one piece that vanishes.
The picture draws both sides growing. A side that shrinks removes a strip instead of adding one, and the same formula holds with the negative change; the drawing is for positive quantities, the algebra is not restricted to them.
Check it with numbers
Over \delta t=0.01 s: \delta V=0.005 V and \delta I=-0.001 A.
- Top strip: V\,\delta I=12\times(-0.001)=-0.012 W
- Side strip: I\,\delta V=2\times0.005=0.010 W
- Corner: \delta V\,\delta I=0.005\times(-0.001)=-0.000005 W
\delta P=-0.002005 W, and \frac{\delta P}{\delta t}=-0.2005 W/s. The strips alone give -0.2 W/s.
The rule it gives
For y=uv, with u and v functions of x:
In words: the first times the derivative of the second, plus the second times the derivative of the first — one strip for each side of the rectangle.
Worked example
Differentiate y=x^2e^x. With u=x^2 and v=e^x:
At x=1: 3e=8.155. Numerically, \big(y(1.001)-y(1)\big)/0.001=8.164, settling on 8.155.
Where this shows up
The charger's power is falling at 0.2 W/s even though the voltage is rising: the falling current's strip outweighs the rising voltage's strip. A charge controller that watched only the voltage would think the delivered power was increasing — the product rule is the reason controllers track power directly.
Narration spine. State the charger problem and write the "product of rates" guess; check its units and strike it out. Draw the rectangle V by I, grow it, and let the two strips and the corner appear. Build \delta P from copies of the three pieces, put the numbers in, fade the corner, and shrink the nudge. Relabel V, I as u, v to get the general rule, and only then state the mnemonic.
Unit 07: The Quotient Rule, and \tan x
The problem
A heating element's resistance is found from R=\frac VI. As it warms, at one instant V=10 V rising at 0.2 V/s and I=2 A rising at 0.1 A/s. Is the resistance rising or falling, and how fast?
First attempt
"The rate of a quotient is the quotient of the rates": \frac{0.2}{0.1}=2 Ω/s? Test on something known: \frac{x^2}{x}=x has derivative 1, but the guess gives \frac{2x}{1}=2x. Wrong.
The idea that works
A quotient has no picture as clean as the rectangle, so here the proof is algebraic, and it leans on the product rule. If y=\frac uv, then
Differentiate both sides with the product rule:
Solve for \frac{dy}{dx} and replace y by \frac uv:
This assumes v\neq0 at the point, and that y has a derivative there (it does whenever u and v do and v\ne0).
An intuition, not a proof: growth in the numerator raises the quotient; growth in the denominator lowers it. The minus sign is the denominator pushing back, and the v^2 reflects that a quotient with a big denominator is less sensitive to everything.
Check it with numbers
For y=\frac{x^2+1}{x-1} at x=3: u=10, \frac{du}{dx}=6, v=2, \frac{dv}{dx}=1, so
Numerically, \big(y(3.001)-y(3)\big)/0.001=0.50025.
The rule it gives
In words: bottom times derivative of top, minus top times derivative of bottom, all over bottom squared.
\tan x. With u=\sin x and v=\cos x:
At x=0.5: \sec^20.5=1.29845; numerically 1.29916 with \delta x=0.001.
Worked example
Differentiate y=\frac{\sin x}{x} and evaluate at x=1.
At x=1: \cos1-\sin1=0.5403-0.8415=-0.3012.
Where this shows up
For the heating element: R=\frac{10}{2}=5 Ω, and
The resistance is falling even though the voltage is rising — the current is rising faster in proportion. An element whose resistance falls as it heats has a negative temperature coefficient, which is the behaviour of a thermistor rather than a metal wire.
Narration spine. Write the "quotient of rates" guess and refute it on \frac{x^2}{x}. Rewrite y=\frac uv as u=yv, apply the product rule's rectangle to yv, and solve for \frac{dy}{dx} on screen. Check at x=3. Apply it to \frac{\sin x}{\cos x} and watch \cos^2x+\sin^2x collapse to 1.
Unit 08: The Chain Rule — Nudges Passing Down a Chain
The problem
A stone drops into a still pond. The ripple's radius grows at a steady 0.5 m/s. When the radius is 2 m, how fast is the disturbed area growing, in square metres per second?
The area depends on the radius, A=\pi r^2, and the radius depends on time. So area depends on time through the radius: a function of a function.
First attempt
\frac{dA}{dr}=2\pi r=4\pi\approx12.57. But that is square metres per metre of radius, and the question asks per second. The units say something is missing.
The picture
Put each quantity on its own number line, one above the other: time, then radius, then area. A marker on each line shows its current value, and moving the time marker drags the other two with it.
Nudge time by \delta t. The radius marker moves by \delta r\approx0.5\,\delta t: the first link stretches the nudge by a factor 0.5. The area marker then moves by \delta A\approx2\pi r\,\delta r: the second link stretches its input nudge by 2\pi r. A nudge that passes through two stretches is stretched by their product.
Why 2\pi r\,\delta r? The new area is a thin ring around the old circle. Unroll it: it is almost a rectangle as long as the circumference, 2\pi r, and as wide as \delta r.
Check it with numbers
At r=2 m, with \delta t=0.01 s:
- \delta r=0.5\times0.01=0.005 m
- \delta A\approx2\pi\times2\times0.005=0.0628 m² (exactly \pi(2.005^2-2^2)=0.06291 m²)
- \frac{\delta A}{\delta t}\approx\frac{0.0628}{0.01}=6.28 m²/s
And 0.5\times4\pi=6.28: the two stretches multiplied.
The rule it gives
If y depends on u, and u depends on x, then for small nudges
which is just multiplying and dividing by \delta u. Let \delta x\to0; then \delta u\to0 too, and
This is the chain rule. The argument quietly assumes \delta u\neq0 for small \delta x, so that dividing by it is allowed; the rule remains true when that fails, but proving it then takes more care than belongs here.
In practice: differentiate the outer function as if its inside were a single variable, then multiply by the derivative of the inside. With F standing for any function of x:
Worked example
Differentiate y=(3x+1)^4. The inside is u=3x+1, with \frac{du}{dx}=3; the outside is u^4, with \frac{dy}{du}=4u^3:
At x=1: 12\times4^3=768. Numerically, 768.86 with \delta x=0.001.
A second: y=\sin(x^2) gives \frac{dy}{dx}=\cos(x^2)\cdot2x; at x=1.5, 3\cos2.25=-1.885.
Where this shows up
The ripple's area grows at 2\pi r\times0.5=\pi r m²/s: 6.28 m²/s at r=2 m, and faster as the ripple spreads, even though the radius grows steadily.
A capacitor of 12 V discharging through a resistor with RC=2 s has voltage V=12e^{-t/2}. The inside is -\frac t2, with derivative -\frac12, so
At t=1 s the voltage is falling at 6e^{-0.5}=3.64 V/s. The crank of Unit 04 is the same rule: h=r\sin(\omega t) gives \frac{dh}{dt}=r\omega\cos(\omega t).
Narration spine. Drop the stone and grow the ripple. Stack three number lines — time, radius, area — with a marker on each, and drag the time marker so the others follow. Wiggle time by \delta t and show the nudge stretched by 0.5, then by 2\pi r, unrolling the thin ring into a rectangle to justify the second stretch. Put in the numbers, then relabel the lines x, u, y to write the chain rule.
Unit 09: Inverses — \ln x and a^x
The problem
The same capacitor, V=12e^{-t/2}, triggers an alarm when its voltage falls to a threshold V. Solving for the time gives
If the threshold is set a little lower, how much later does the alarm sound? That needs the rate of change of \ln V.
First attempt
From first principles: \frac{\ln(x+\delta x)-\ln x}{\delta x}=\frac1{\delta x}\ln\left(1+\frac{\delta x}{x}\right), and it is not obvious what that settles on.
The picture
\ln x undoes e^x: y=\ln x means exactly x=e^y. So the graph of \ln x is the graph of e^x reflected in the line y=x, which swaps the two axes.
Reflection swaps horizontal and vertical, so it swaps every rise with its run: a slope m becomes a slope \frac1m. At the point (a,e^a) on the exponential, the slope is e^a (Unit 05). The reflected point on the logarithm is (e^a,a), and its slope is \frac1{e^a}. Its x-coordinate is e^a, so the slope of \ln x at any x is \frac1x.
The same argument, written with the chain rule: x=e^y; differentiate both sides with respect to x:
Check it with numbers
At x=2: the exponential at y=\ln2=0.6931 has slope e^{0.6931}=2, so the logarithm at x=2 has slope \frac12. Numerically, \frac{\ln2.001-\ln2}{0.001}=0.49988.
The rule it gives
Any base, a^x. Since a=e^{\ln a}, a^x=e^{x\ln a}. The chain rule, with inside x\ln a whose derivative is the constant \ln a:
This is the constant from Unit 05: the growth constant of base 2 is \ln2=0.6931, of base 3 is \ln3=1.0986, of base 10 is \ln10=2.3026. Check: the slope of 2^x at x=3 is 8\ln2=5.545; numerically 5.547.
The power rule for every power. For x>0 and any real n, x^n=e^{n\ln x}. The chain rule gives
completing the power rule of Unit 02 for fractional, negative and irrational powers alike. Check: \frac{d}{dx}x^{1.5} at x=4 is 1.5\times2=3; numerically 3.0002.
Worked example
Differentiate y=\ln(x^2+1). The inside is F=x^2+1, with \frac{dF}{dx}=2x:
At x=1 the gradient is \frac22=1.
Where this shows up
For the alarm, t=2\ln12-2\ln V, so
With a 3 V threshold the alarm sounds at t=2\ln4=2.77 s, and lowering the threshold by 0.1 V delays it by about \frac{2}{3}\times0.1=0.067 s. The lower the threshold, the more sensitive the timing becomes — the \frac1V at work.
Narration spine. Draw e^x and the mirror line y=x, and reflect the curve to get \ln x. Pick a point with its tangent triangle and reflect the triangle too, so rise and run visibly swap. Read off \frac1x. Then rewrite a^x as e^{x\ln a} and connect the constant 0.6931 from Unit 05 to \ln2.
Unit 10: Newton–Raphson — Riding the Tangent to a Root
The problem
A spherical fuel tank of radius 1 m holds 1 m³ of fuel. The depth gauge must be calibrated: how deep is the fuel? The volume of liquid at depth h in a sphere of radius R is V=\frac{\pi h^2(3R-h)}{3}. With R=1 and V=1:
There is no tidy formula for this root. Find h to six decimal places.
First attempt
f(0.6)=+0.091 and f(0.7)=-0.172, so the curve crosses zero between them. Keep halving the interval and keeping the half where the sign changes. It works, but slowly: each halving gains about one binary digit, so reaching six decimal places from an interval of width 0.1 takes 17 more halvings.
The picture
Near a point, a smooth curve is nearly its tangent line (Unit 01). And a straight line's crossing with the axis is easy to find. So replace the curve by its tangent at a first guess x_0, and use the tangent's crossing as the next guess.
The tangent falls a height f(x_0) over a run x_0-x_1, and its gradient is f'(x_0). So the run is \frac{f(x_0)}{f'(x_0)}, and
Repeat from x_1. Each tangent starts closer to the root, where the curve is even more nearly straight.
Check it with numbers
For the tank, f'(h)=3h^2-6h. Start at h_0=0.5:
| n | h_n | f(h_n) | f'(h_n) |
|---|---|---|---|
| 0 | 0.5000000 | 0.3299297 | -2.2500000 |
| 1 | 0.6466354 | -0.0291000 | -2.6254004 |
| 2 | 0.6355514 | -0.0001316 | -2.6015316 |
| 3 | 0.6355008 | 0.0000000 | -2.6014210 |
| 4 | 0.6355008 | 0.0000000 | -2.6014210 |
The value repeats, so to six decimal places the depth is h=0.635501 m. Check: \frac{\pi(0.635501)^2(3-0.635501)}3=1.000000 m³.
Watch the error: 0.136, then 0.011, then 0.00005 — each step roughly squares the previous error, so the number of correct digits roughly doubles.
The rule it gives
This is the Newton–Raphson method. To use it:
- Find a starting value near the root: look for a sign change of f, or sketch the graph.
- Iterate the formula, keeping a table of x_n, f(x_n) and f'(x_n).
- Stop when successive values agree to the accuracy required.
When it fails. The method trusts the tangent, and a nearly flat tangent crosses the axis far away. Start at h_0=0.05, where f'(h)=3h^2-6h is close to zero: f(0.05)=0.948 and f'(0.05)=-0.293, so h_1=0.05+\frac{0.948}{0.293}=3.29 m — deeper than the tank is tall. From there the iterations settle on h=2.885, a genuine root of the cubic but a meaningless depth. (The cubic has three real roots, -0.521, 0.636 and 2.885; only one lies between 0 and 2.) If f'(x_n)=0 exactly, the formula divides by zero and the method stops altogether. A sensible starting value, and a check that the answer makes physical sense, are part of the method.
Worked example
Solve x^3-2x-5=0, starting from x_0=2. Here f'(x)=3x^2-2.
| n | x_n | f(x_n) | f'(x_n) |
|---|---|---|---|
| 0 | 2.0000000 | -1.0000000 | 10.0000000 |
| 1 | 2.1000000 | 0.0610000 | 11.2300000 |
| 2 | 2.0945681 | 0.0001857 | 11.1616468 |
| 3 | 2.0945515 | 0.0000000 | 11.1614377 |
x=2.094551 to six decimal places.
Where this shows up
The tank is the application: a gauge that reads depth must convert it to volume, and a controller that needs a volume setpoint must convert back — solving this cubic, typically by exactly this iteration, a few times a second. Newton–Raphson is the workhorse behind many engineering solvers, from circuit simulators finding operating points to structural codes solving nonlinear equilibrium, for the reason the error table shows: once it is close, it converges very fast.
Narration spine. Show the half-filled sphere and the cubic whose root is its depth. Bracket the root by the sign change, then draw the tangent at h_0=0.5 and slide down it to the axis to get h_1. Repeat, zooming in each time as the tangent crossings close on the root, with the table filling in alongside. Finally start from h_0=0.05 and watch the nearly flat tangent throw the estimate out of the tank.