Computing every derivative from its limit would be
slow, and nobody does. The
goal of this lesson is to build a small kit instead: a handful of rules that
combine derivatives you already know into the derivatives of almost any formula
you will meet in Physics. The rules are the
sum rule, the
product rule and the
chain rule. Three functions get special attention:
eˣ, which is its own derivative, and sine and cosine, which turn into each
other. You need the derivative as a limit, sine and cosine on the
unit circle (with angles in
radians), and the slope of eˣ at 0.
Sums and constant multiples
Two rules come straight from the fact that limits add:
(f + g)′ = f′ + g′ and (c f)′ = c f′ for a constant c.
The first is the sum rule: the change in f + g is the
change in f plus the change in g, so the same holds for the average rates and,
in the limit, for the derivatives. The second says that stretching a function
by c stretches its slopes by c. With the power rule
they differentiate every polynomial term by term:
(4.9t² + 3t + 2)′ = 9.8t + 3
Measure downwards from a bridge's rail, and a stone thrown straight down at
3 m/s from 2 m below the rail is 4.9t² + 3t + 2 metres down after t seconds;
its speed is then 9.8t + 3 m/s.
Products
The derivative of a product is not the product of the derivatives. The
product rule is
(f g)′ = f′ g + f g′
Picture a rectangle with sides f and g that both grow. When f grows by a little
Δf and g by Δg, the area f g grows by three pieces: a strip g Δf along one side,
a strip f Δg along the other, and a tiny corner Δf Δg. Divide by the change in
the input and let it shrink: the strips give f′g and fg′, and the corner, a
product of two small changes, vanishes.
A check you can do by hand: x⁵ = x² × x³, and the product rule gives
2x × x³ + x² × 3x² = 5x⁴, which the power rule agrees with.
Divide by h. The second part tends to f′(x) g(x). In the first, the quotient
tends to g′(x), and f(x + h) tends to f(x) because a
differentiable function is continuous
(the previous lesson). So the whole tends to f(x) g′(x) + f′(x) g(x).
eˣ is its own derivative
The exponential function is
f(x) = eˣ, where e ≈ 2.71828 is Euler's number,
met as a limit in the lesson on e. Its
derivative needs one fact about powers, e^(x + h) = eˣ × eʰ:
(e^(x + h) − eˣ) ÷ h = eˣ × (eʰ − 1) ÷ h
The factor eˣ does not depend on h, and the other factor is the slope of the
chord of eˣ from 0 to h, which tends to the slope of eˣ at
0, which is 1. So
(eˣ)′ = eˣ
At every point, the curve y = eˣ climbs exactly as steeply as it is high. Only
eˣ and its multiples c eˣ do that (stated here without proof), and it is why e,
and no other base, is called natural.
The lesson on e squeezed (eʰ − 1) ÷ h between 1 and 1/(1 − h) only for
h = 1/2, 1/3, 1/4, … . A limit as h → 0 needs every way of shrinking h,
through any small numbers, positive or negative. The expander finishes the job.
Why the slope of eˣ at 0 is 1 however h shrinks
One inequality does all the work: eʰ ≥ 1 + h for every number h. It needs
one tool, Bernoulli's inequality: for
a whole number p and any x ≥ −1,
(1 + x)ᵖ ≥ 1 + px. It holds for p = 1, and if it holds for p, multiplying by
1 + x, which is not negative, gives (1 + x)ᵖ⁺¹ ≥ (1 + px)(1 + x)
= 1 + (p + 1)x + px², which is at least 1 + (p + 1)x. Step by step it holds for
every p.
h a positive fraction p/q. The lesson on e showed e^(1/q) > 1 + 1/q.
Raise both sides to the power p: e^(p/q) > (1 + 1/q)ᵖ ≥ 1 + p/q.
h a fraction −p/q between −1 and 0, so q is at least 2. The lesson on e
showed e^(1/q) < 1 + 1/(q − 1) = q/(q − 1); turned upside down,
e^(−1/q) > 1 − 1/q. Raise to the power p: e^(−p/q) > (1 − 1/q)ᵖ ≥ 1 − p/q.
h = 0 gives 1 ≥ 1, and h ≤ −1 is easy: eʰ is positive and 1 + h is not.
Any other h is the
limit of a sequence of fractions. eˣ is continuous,
and a limit of numbers that are all ≥ 0 is ≥ 0, so the inequality survives.
Now use it twice, for h and for −h: eʰ ≥ 1 + h, and e^(−h) ≥ 1 − h, which for
h below 1 turns upside down into eʰ ≤ 1/(1 − h). Subtract 1 from each and divide
by h:
for h between 0 and 1: 1 ≤ (eʰ − 1)/h ≤ 1/(1 − h);
for h between −1 and 0, dividing by a negative number flips both:
1/(1 − h) ≤ (eʰ − 1)/h ≤ 1.
Either way the slope of the chord is caught between 1 and 1/(1 − h), and
1/(1 − h) tends to 1 however h tends to 0. So the slope tends to 1.
Sine and cosine turn into each other
Here the angle is in radians, and it matters. Everything
rests on one limit:
sin h ÷ h tends to 1 as h → 0 (h in radians).
h
0.5
0.1
0.01
sin h ÷ h
0.958851
0.998334
0.999983
Why sin h ÷ h tends to 1
Take h between 0 and π/2, and on the unit circle
mark the point P = (cos h, sin h) and the point A = (1, 0). Compare three areas,
each inside the next:
the triangle with corners (0, 0), A and P has base 1 and height sin h, so
area sin h ÷ 2;
the slice of the disc between the radii to A and to P is the fraction h/2π of
the whole disc, whose area is π (the area of a disc of radius 1, stated here
without proof), so its area is h ÷ 2;
the larger right-angled triangle with corners (0, 0), A and the point where
the line from (0, 0) through P meets the upright line x = 1 has height
sin h ÷ cos h (it is an enlargement of the triangle under P), so area
sin h ÷ (2 cos h).
So sin h ≤ h ≤ sin h ÷ cos h. Dividing by sin h and turning each side upside
down gives cos h ≤ sin h ÷ h ≤ 1. As h → 0, cos h tends to cos 0 = 1, so
sin h ÷ h is squeezed to 1. For negative h, sin(−h) ÷ (−h) is the same number
as sin h ÷ h, so the limit is the same.
Now follow the point (cos x, sin x) round the unit circle as x grows.
Step 1 / 4 — 1 · A chord of the circle
From angle x to angle x + h the point moves along a chord. The two radii, each 1 long, and the chord form a triangle with the angle h between the radii. Cut it in half along the radius at angle x + h/2: each half is a right-angled triangle with hypotenuse 1 and angle h/2, so half the chord is sin(h/2), and the whole chord is 2 sin(h/2) long.
(sin x)′ = cos x and (cos x)′ = −sin x
The picture makes sense of the signs. At x = 0 the point is at (1, 0) and moving
straight up: its height, sin x, grows at rate cos 0 = 1, and its distance
across, cos x, is not changing yet, −sin 0 = 0. In the next lesson this
same moving point becomes a moon on its orbit.
Why radians. Measure h in degrees instead, and sin h ÷ h tends to
π/180 ≈ 0.017453 rather than 1 (sin 1° is about 0.017452), so every derivative
of sine and cosine would carry that awkward factor. Radians are the unit in which the
factor is 1.
The chain rule
Most formulas are functions of functions. sin(2x) takes x, doubles it, then
takes the sine; e^(−x) negates x, then exponentiates. Doing g first and then f
to its result gives the composite function
f(g(x)). The function applied first, g, is the
inside function, and the one applied to its
result, f, is the outside function. Its
derivative is the chain rule:
(f(g(x)))′ = f′(g(x)) × g′(x)
Rates multiply. If a gear u turns 2 times as fast as x, and a gear y turns 3
times as fast as u, then y turns 6 times as fast as x: dy/dx = dy/du × du/dx.
sin(2x) has derivative cos(2x) × 2 = 2 cos(2x): doubling the angle doubles the
speed of turning.
e^(−x) has derivative e^(−x) × (−1) = −e^(−x): it falls exactly as fast as it
is high.
sin(x²) has derivative cos(x²) × 2x. At x = 1.5 that is 3 cos 2.25 ≈ −1.884521.
sin(ωt), for a constant ω (the Greek letter omega), has derivative ω cos(ωt). This is the one the next
lesson needs, with ω the angular speed.
Physics meets e^(kt), whose derivative is k e^(kt), in every process whose rate
is proportional to its amount, such as radioactive decay.
Why the chain rule holds
Write u = g(x) and Δu = g(x + h) − g(x). When Δu is not 0,
(f(g(x + h)) − f(g(x))) ÷ h = (f(u + Δu) − f(u)) ÷ Δu × Δu ÷ h
As h → 0, Δu → 0 because g is continuous, so the first factor tends to f′(u)
and the second to g′(x). If Δu is exactly 0 for some small h, the left side is
0 there too; a careful proof handles those h separately and reaches the same
limit (that case is stated here without proof).
The kit
Function
Derivative
c (a constant)
0
xⁿ
n xⁿ⁻¹
eˣ
eˣ
sin x
cos x
cos x
−sin x
f + g, c f
f′ + g′, c f′
f g
f′ g + f g′
f(g(x))
f′(g(x)) × g′(x)
For example, x sin x has derivative sin x + x cos x by the product rule.
Compute to see: check a derivative at sample points
A rule applied wrongly gives a confident wrong answer. The previous lesson's
central difference catches it: if a formula really is the derivative, it agrees
with the difference at every point you try.
import math
def f(x):
return math.sin(x * x)
def df(x): # the chain rule's answer
return 2 * x * math.cos(x * x)
h = 1e-5
for x in (0.5, 1.5, 2.5):
est = (f(x + h) - f(x - h)) / (2 * h)
print(x, abs(est - df(x)) < 1e-8) # True
Try the wrong answer cos(2x) in place of df and the check prints False at
once. A check like this is how the rungs grade your derivatives, with nothing
but Python's math. Agreement at sample points is strong evidence, and the
rules above are the proof: compute to see, prove to know.
Check yourself
Loading the exercise...
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
Images, PDF or text. Kept on this device only.
Keeping your files on this device
Off by default. The mentor always gets your file; this only decides whether your own copy stays here. Copies live in this browser only - they do not follow you to another device, and clearing site data removes them.
Ctrl/Cmd + Enter to send
🎓 Practice ladder
2 graded rungs · ~25 min
Two rungs in your browser, in a little Python (Beginner Python
teaches it): write eight derivatives with the rules, checked at sample points,
then build the product and chain rules as functions that make derivatives.
Rung 1 — differentiate eight functions with the rules
Loading exercise…
Rung 2 — the product and chain rules as code
Loading exercise…
My notes on this module
Loading your notes...
Rules of differentiation: sin, cos, exp and the chain rule — TransformerLab