Leyla is travelling by intercity bus. The bus covers 240 km in 3 hours, so its average speed is 80 km/h. Yet the speedometer never showed a steady 80: 0 at a traffic light, 90 on a straight road, 50 on a bend. Every moment has its own speed. The question “what is the speed at one particular moment?” led the mathematicians of the 17th century to the idea of the derivative. In this lesson we follow the same path step by step: first we learn to measure change (increments), then the average rate of change, and then what happens when the interval shrinks towards zero.
The increment of the argument and of the function
The derivative describes change, so first we learn to measure change. Let y = f(x) be a function and x₀ a point of its domain. The argument moves from x₀ to another value x, and the value of the function moves from f(x₀) to f(x). We write these changes with the Greek letter Δ (“delta”), which here means “difference”.
Increment of the argumentDefinition
Δx = x − x₀, the difference between the new and the old value of the argument. Δx may be positive (a step to the right) or negative (a step to the left), but never zero.
Increment of the functionDefinition
Δf = f(x₀ + Δx) − f(x₀), the difference between the new and the old value of the function. If Δf > 0 the function went up, if Δf < 0 it went down, and if Δf = 0 it did not change.
Where
- x₀
- the starting point (the old value of the argument)
- x = x₀ + Δx
- the new value of the argument
- Δx
- the increment of the argument, Δx ≠ 0
- Δf
- the increment of the function (also written Δy)
An increment is always “new value minus old value”, for the argument and for the function alike.
An increment simply answers “how much did it change?”, and it is always “final value minus starting value”. In the morning the thermometer showed 8 °C, at noon 15 °C: the increment of the temperature is 15 − 8 = +7 °C. In the evening it was 10 °C: from noon to evening the increment is 10 − 15 = −5 °C. A negative increment means “it went down”, even though it is called an increment.
Picture it on the graph: you stand at the point A(x₀, f(x₀)) of the graph. First you take a horizontal step of Δx, then you climb vertically by Δf until you are back on the graph (if Δf < 0, you go down). This brings you to a second point of the graph, B(x₀ + Δx, f(x₀ + Δx)). Δx is the width of this “stair step” and Δf is its height.
| Δx | x₀ + Δx | f(x₀ + Δx) | Δf |
|---|---|---|---|
| 2 | 3 | 9 | 8 |
| 1 | 2 | 4 | 3 |
| 0.5 | 1.5 | 2.25 | 1.25 |
| −0.5 | 0.5 | 0.25 | −0.75 |
| −1 | 0 | 0 | −1 |
Computing increments
Problem
1) f(x) = 3x − 1, x₀ = 2, Δx = 0.5. Find Δf. 2) f(x) = x², and the argument moves from x₀ = 3 to x = 2. Find Δx and Δf. 3) For f(x) = x², express Δf in terms of x₀ and Δx.
Show solutionHide solution
Solution
Δf = 6.5 − 5 = 1.5. Note that 1.5 = 3 · 0.5: for a linear function Δf = k · Δx always holds.
2) Δx = 2 − 3 = −1 (a step to the left).
Δf = f(2) − f(3) = 4 − 9 = −5: the function decreased.
3) Δf = (x₀ + Δx)² − x₀² = x₀² + 2x₀Δx + (Δx)² − x₀² = 2x₀Δx + (Δx)².
Check: with x₀ = 3 and Δx = −1 we get 2 · 3 · (−1) + (−1)² = −6 + 1 = −5, the same as in part 2.
The average rate of change and the secant
An increment alone says little: you can cover 10 km in 5 minutes or in 5 hours. To know how fast something changes, we divide the increment of the function by the increment of the argument. The ratio Δf / Δx is the average rate of change: by how many units the function changes, on average, when the argument changes by 1 unit. Its unit is “unit of the function per unit of the argument”: km/h, cm per year, manat per month.
Where
- Δf / ΔxΔf / Δx
- the average rate of change between x₀ and x₀ + Δx
- Δf
- the increment of the function
- Δx
- the increment of the argument, Δx ≠ 0
The average rate of change. For a distance–time function it is the average speed: Δs / Δt.
Average rates in real life
Problem
1) At 10:00 the bus was at kilometre 70 of the road, and at 12:00 at kilometre 230. What was its average speed during these two hours? 2) Leyla was 148 cm tall at the age of 12 and 163 cm at 15. Find the average rate of her growth. 3) Find the average rate of change of f(x) = x² on [1, 3].
Show solutionHide solution
Solution
Average speed: Δs / Δt = 160 / 2 = 80 km/h.
2) Δt = 15 − 12 = 3 years, Δh = 163 − 148 = 15 cm.
Δh / Δt = 15 / 3 = 5 cm per year. This does not mean Leyla grew exactly 5 cm every year: some years more, some less. 5 cm per year is only the average.
3) x₀ = 1, Δx = 3 − 1 = 2, Δf = f(3) − f(1) = 9 − 1 = 8.
Δf / Δx = 8 / 2 = 4: on this interval the function grows on average by 4 units per unit of x.
Now the geometry. The straight line through the points A(x₀, f(x₀)) and B(x₀ + Δx, f(x₀ + Δx)) of the graph is called a secant (it “cuts” the graph in at least two points). From linear functions you know that the slope of a line through two points is “vertical difference over horizontal difference”. For A and B the vertical difference is Δf and the horizontal one is Δx. So the average rate of change is the slope of the secant: algebra and geometry say the same thing.
A secant is simply a straight line through two points of the graph. Its steepness (slope) is measured as “how far it went up divided by how far it went right”, that is Δf / Δx. Example: the points (1, 1) and (3, 9) of the parabola y = x². We go 2 units to the right and 8 units up: the slope is 8 / 2 = 4. So the secant rises 4 units for every 1 step to the right — and that is exactly the average rate of change on this interval.
SecantDefinition
A straight line through two points of the graph of a function. Its slope equals the average rate of change between these two points, Δf / Δx.
Where
- (x₁, y₁), (x₂, y₂)
- two points of the graph (A and B)
- k
- the slope of the secant
The slope of a secant. If k > 0 the secant rises from left to right; if k < 0 it falls.
The slope of a secant
Problem
Find the slope of the secant: 1) through the points of the parabola y = x² with x-coordinates 1 and 3; 2) through the points of the same parabola with x-coordinates −1 and 2; 3) through the points of the hyperbola y = 1/x with x-coordinates 1 and 4; 4) the general case: through the points of y = x² with x-coordinates a and a + h.
Show solutionHide solution
Solution
2) A(−1, 1), B(2, 4): k = (4 − 1) / (2 − (−1)) = 3 / 3 = 1.
3) A(1, 1), B(4, 1/4): k = (1/4 − 1) / (4 − 1) = (−3/4) / 3 = −1/4 < 0, so the secant falls.
4) k = ((a + h)² − a²) / h = (2ah + h²) / h = 2a + h.
In the interactive graph below the second line is exactly this secant: y = (2a + h)(x − a) + a².
Δx → 0: from the secant to the tangent
An average speed describes a whole interval, but we want the speed at one moment. A natural idea: make the interval shorter and shorter. Let us compute for f(x) = x² and x₀ = 1. By the general formula above, Δf = 2x₀Δx + (Δx)² = 2Δx + (Δx)², so Δf / Δx = 2 + Δx. Now let Δx approach zero from the right and from the left:
| Δx | Δf | Δf / Δx |
|---|---|---|
| 1 | 3 | 3 |
| 0.1 | 0.21 | 2.1 |
| 0.01 | 0.0201 | 2.01 |
| 0.001 | 0.002001 | 2.001 |
| −0.001 | −0.001999 | 1.999 |
| −0.01 | −0.0199 | 1.99 |
| −0.1 | −0.19 | 1.9 |
The ratio gets as close to 2 as we like: the smaller Δx is, the smaller the gap between Δf / Δx and 2 (the gap is exactly Δx). Mathematicians write this as lim (Δx→0) Δf / Δx = 2 and read it: “the limit of Δf / Δx as Δx tends to zero is 2”. Note: Δx never becomes zero. With Δx = 0 we would get the meaningless expression 0 / 0. A limit answers the question “which number does the ratio approach?”, not “what is the ratio when Δx = 0?”.
The geometric picture is the same. As Δx shrinks, the point B slides along the graph towards A and the secant turns around A. In the limit it reaches a limiting position: the line tangent to the graph at A. The slope of the tangent is the limit of the slopes of the secants; in our example it is 2. The same holds for the bus: the average speeds over shorter and shorter time intervals approach the instantaneous speed that the speedometer shows.
The idea of a limit in plain words: we cannot take Δx = 0 (you cannot divide by zero), but we can make Δx smaller and smaller and see what the ratio is “aiming at”: 2.1, 2.01, 2.001, … The ratio approaches 2, and this target number is called the limit. The same happens on the graph: as the point B moves closer and closer to A, the secant turns and in the end becomes the line that just touches the graph at A — the tangent; its slope is 2. It is the same with the bus: over shorter and shorter time intervals the average speed approaches the instantaneous speed shown by the speedometer.
At university the limit has an exact definition: lim (x→x₀) g(x) = L means that for every number ε > 0 there is a δ > 0 such that 0 < |x − x₀| < δ implies |g(x) − L| < ε. In words: any precision you ask for can be guaranteed by taking Δx small enough. In our example |Δf / Δx − 2| = |Δx|, so δ = ε is enough: take |Δx| smaller than 0.001, and the ratio differs from 2 by less than 0.001.
Interactive
The definition of the derivative
DerivativeDefinition
The derivative of a function f at the point x₀ is the limit of the ratio of the increment of the function to the increment of the argument as Δx tends to zero (if this limit exists and is a finite number). It is written f′(x₀).
Where
- f′(x₀)
- the derivative at x₀, a number (read “f prime of x nought”)
- lim (Δx→0)
- the limit as Δx tends to zero
- Δf, Δx
- the increments of the function and of the argument
The definition of the derivative: the derivative is the instantaneous rate of change, the limit of the average rate of change as Δx → 0. In geometric terms, it is the slope of the tangent.
Differentiable function, differentiationDefinition
If f′(x₀) exists (the limit exists and is finite), f is called differentiable at x₀. A function that is differentiable at every point of an interval is differentiable on that interval. The operation of finding a derivative is called differentiation.
The derivative has several notations: f′(x) (“f prime of x”), y′ (“y prime”) and dy/dx (“dee y by dee x”). The last one recalls the definition: a tiny Δy divided by a tiny Δx. An important idea: if we let the point x₀ vary, we get a number f′(x) for every x. So the derivative is a new function. For example, for f(x) = x² we have f′(x) = 2x (we prove it below): f′(1) = 2, f′(3) = 6, f′(−2) = −4, f′(0) = 0.
Why is the derivative so useful? For a small Δx, Δf ≈ f′(x₀) · Δx, that is f(x₀ + Δx) ≈ f(x₀) + f′(x₀) · Δx: the curve is replaced by its tangent. The product f′(x₀) · Δx is called the differential of the function and is written dy = f′(x) dx — this is where Leibniz’s notation comes from. Example: for √x, f′(4) = 1/4, so √4.1 ≈ 2 + 0.1 · 1/4 = 2.025 (the exact value is 2.0248…). For (1 + x)¹⁰ the derivative at 0 is 10, so 1.01¹⁰ ≈ 1 + 10 · 0.01 = 1.1 (exactly 1.1046…). Physicists and engineers use this “linearisation” every day.
1. The increment of the function
Write Δf = f(x₀ + Δx) − f(x₀) and simplify: substitute the whole expression x₀ + Δx for x, expand the brackets and collect like terms. After a correct simplification every term contains the factor Δx.
2. The ratio
Form the ratio Δf / Δx and cancel Δx. With fractions, bring them to a common denominator first; with roots, multiply the numerator and the denominator by the conjugate expression.
3. The limit
In the simplified expression let Δx → 0: now you may put 0 in place of Δx. The number you get is f′(x₀). Write x instead of x₀ and you get the function f′(x).
The three steps with numbers
Problem
f(x) = 3x². Find f′(1) from the definition.
Show solutionHide solution
Solution
2) Ratio: (6Δx + 3(Δx)²) / Δx = 6 + 3Δx.
3) Limit: as Δx → 0 the term 3Δx disappears, so f′(1) = 6.
Check on a calculator: with Δx = 0.01, (3 · 1.01² − 3) / 0.01 = 6.03 — indeed very close to 6.
A constant and a linear function
Problem
Use the definition to find the derivative: 1) f(x) = 7; 2) f(x) = kx + b (k and b are numbers); 3) f(x) = 5x − 2 and g(x) = −3x + 4.
Show solutionHide solution
Solution
Δf / Δx = 0 / Δx = 0.
Limit: (7)′ = 0. A constant function does not change, so its rate of change is 0: C′ = 0.
2) Δf = (k(x + Δx) + b) − (kx + b) = kΔx.
Δf / Δx = k — the ratio does not depend on Δx at all.
Limit: (kx + b)′ = k. Every secant of a straight line is the line itself, so the derivative is simply its slope.
3) (5x − 2)′ = 5, (−3x + 4)′ = −3. A special case: (x)′ = 1.
x² and x³ from the definition
Problem
1) Use the definition to find the derivative of f(x) = x² at any point x, and compute f′(3). 2) For f(x) = x³ find f′(x), f′(1) and f′(−2).
Show solutionHide solution
Solution
Δf / Δx = 2x + Δx.
Δx → 0: f′(x) = 2x, f′(3) = 2 · 3 = 6.
2) (x + Δx)³ = x³ + 3x²Δx + 3x(Δx)² + (Δx)³, so Δf = 3x²Δx + 3x(Δx)² + (Δx)³.
Δf / Δx = 3x² + 3xΔx + (Δx)².
Δx → 0: f′(x) = 3x²; f′(1) = 3, f′(−2) = 3 · 4 = 12.
f′(−2) > 0: at x = −2 the cubic is rising, although the function itself is negative there (f(−2) = −8).
1/x from the definition
Problem
Use the definition to find the derivative of f(x) = 1/x (x ≠ 0). Compute f′(2), f′(−1) and f′(1/2).
Show solutionHide solution
Solution
2) Δf / Δx = −1 / (x(x + Δx)).
3) Δx → 0: f′(x) = −1 / (x · x) = −1/x².
f′(2) = −1/4, f′(−1) = −1/1 = −1, f′(1/2) = −1 / (1/4) = −4.
The derivative is always negative: both branches of the hyperbola fall from left to right. At x = 0 the function is not defined, so there is no derivative there either.
√x and the conjugate
Problem
Use the definition to find the derivative of f(x) = √x (x > 0). Compute f′(4), f′(9) and f′(1).
Show solutionHide solution
Solution
2) Δf / Δx = (√(x + Δx) − √x) / Δx. We cannot cancel Δx directly, so we multiply the numerator and the denominator by the conjugate expression √(x + Δx) + √x.
Numerator: (√(x + Δx) − √x)(√(x + Δx) + √x) = (x + Δx) − x = Δx (difference of squares).
Δf / Δx = Δx / (Δx · (√(x + Δx) + √x)) = 1 / (√(x + Δx) + √x).
3) Δx → 0: f′(x) = 1 / (√x + √x) = 1 / (2√x).
f′(4) = 1 / (2 · 2) = 1/4, f′(9) = 1 / (2 · 3) = 1/6, f′(1) = 1/2.
The quadratic function ax² + bx + c
Problem
1) Use the definition to find the derivative of f(x) = ax² + bx + c. 2) With this formula compute f′(2) for f(x) = 3x² − 5x + 1 and g′(2) for g(x) = −x² + 4x.
Show solutionHide solution
Solution
Δf / Δx = 2ax + b + aΔx.
Δx → 0: (ax² + bx + c)′ = 2ax + b. The constant term c disappears: it only shifts the graph up or down and does not change its steepness.
2) f′(x) = 2 · 3x − 5 = 6x − 5, f′(2) = 12 − 5 = 7.
g′(x) = −2x + 4, g′(2) = 0. This is no accident: x = 2 is the x-coordinate of the vertex of the parabola (x = −b / (2a) = −4 / (−2) = 2), and at the vertex the parabola neither rises nor falls.
Lagrange’s theorem (the mean value theorem). If f is continuous on [a, b] and differentiable on (a, b), there is a point c where the tangent is parallel to the secant through A and B. If the bus covered 240 km in 3 hours and its speed changed without jumps, then at some moment the speedometer showed exactly 80 km/h. For a parabola, c is always the midpoint of the interval: for y = x² on [1, 3] the slope of the secant is 4, and f′(c) = 2c = 4 gives c = 2. In the next lessons this theorem proves the test for increasing and decreasing functions.
For natural n the general proof follows from the binomial theorem: the term of Δf with the first power of Δx is n · xⁿ⁻¹ · Δx, and all the other terms contain (Δx)² or higher powers. After dividing by Δx and passing to the limit they vanish, and (xⁿ)′ = n · xⁿ⁻¹ remains.
Differentiability and continuity
Recall: a function f is continuous at x₀ if Δf → 0 as Δx → 0, that is, a small change of the argument causes only a small change of the function. On the graph this means there is no break or jump at x₀: you can draw the graph there without lifting your pencil.
Theorem. A function that is differentiable at a point is continuous at that point. The proof takes one line: Δf = (Δf / Δx) · Δx. As Δx → 0 the first factor approaches the number f′(x₀) and the second approaches 0, so Δf → f′(x₀) · 0 = 0. The converse is false: a function can be continuous and still have no derivative. Here are two classic examples.
The theorem in simple words: if a graph has a tangent (a derivative) at a point, it cannot break there. If there were a jump, Δf would not approach zero as Δx shrinks, and the secants would get steeper and steeper until they were vertical. So a differentiable function is continuous. The converse is false: a graph can be unbroken and still have a sharp corner — like the V-shaped graph of y = |x|. You draw it without lifting your pencil, yet at its tip there is no single tangent.
y = |x|: a corner
Problem
Does y = |x| have a derivative at x₀ = 0? Is the function continuous at this point?
Show solutionHide solution
Solution
2) Δf / Δx = |Δx| / Δx. For Δx > 0 this ratio is 1 (e.g. Δx = 0.1: 0.1 / 0.1 = 1), and for Δx < 0 it is −1 (Δx = −0.1: 0.1 / (−0.1) = −1).
3) As Δx approaches zero from the right the ratio equals 1, from the left it equals −1. The two sides give different numbers, so the limit does not exist and f′(0) does not exist.
Continuity: Δf = |Δx| → 0, so the function is continuous at 0.
Geometric meaning: the secants on the right have slope 1, those on the left have slope −1. The graph bends sharply at 0 and forms a “corner”, where there is no tangent. At all other points the derivative exists: (|x|)′ = 1 for x > 0 and (|x|)′ = −1 for x < 0.
y = ∛x: a vertical tangent
Problem
Does y = ∛x have a derivative at x₀ = 0? Is the function continuous at this point?
Show solutionHide solution
Solution
2) Δf / Δx = ∛Δx / Δx = 1 / (∛Δx)². In numbers: for Δx = 0.001, ∛Δx = 0.1 and the ratio is 1 / 0.01 = 100; for Δx = 0.000001, ∛Δx = 0.01 and the ratio is 10,000; for Δx = −0.001, ∛Δx = −0.1 and the ratio is again 100.
3) As Δx → 0 the ratio grows without bound (→ +∞). There is no finite limit, so f′(0) does not exist.
Continuity: Δf = ∛Δx → 0, so the function is continuous.
Geometric meaning: the secants get steeper and steeper and in the limit become a vertical line, the y-axis (x = 0). The graph has a tangent, but a vertical line has no slope. For the same reason y = √x is not differentiable at 0: there Δf / Δx = 1 / √Δx → +∞.
A corner can be smoothed — or become a beak
Problem
Is there a derivative at x₀ = 0: a) f(x) = x · |x|; b) g(x) = √|x|?
Show solutionHide solution
Solution
b) For Δx > 0 the ratio is √Δx / Δx = 1/√Δx → +∞, and for Δx < 0 it is −1/√|Δx| → −∞. There is no derivative: at 0 the graph looks like a bird’s beak (two branches meet vertically).
At university you will see an even stranger example: the Weierstrass function (1872) is continuous everywhere but has a derivative at no point.
| Case | Example | What happens as Δx → 0 |
|---|---|---|
| A break (jump) | f(x) = 0 for x < 0, f(x) = 1 for x ≥ 0; x₀ = 0 | from the left Δf = −1 and does not approach 0: the function is not continuous, so there is no derivative |
| A corner | y = |x|, x₀ = 0 | Δf / Δx is 1 from the right and −1 from the left: no limit |
| A vertical tangent | y = ∛x and y = √x, x₀ = 0 | Δf / Δx → +∞: no finite limit |
- 1.For f(x) = x², x₀ = 2 and Δx = 0.5: Δf =
- 2.The average rate of change of f(x) = x² on [2, 5] is
- 3.For f(x) = 4x² − x + 3: f′(x) =
- 4.For f(x) = 1/x: f′(4) =
- 5.For f(x) = √x: f′(25) =
- 6.The derivative of y = |x| at x = −3 is
Finding derivatives from the definition shows you the “engine” of the derivative, but computing a limit every time is tiring. In the next lesson we study the geometric and physical meaning of the derivative and the equation of the tangent line; then come the table of derivatives and the rules for the derivative of a sum, a product and a quotient. These formulas are derived from the definition once and then used as ready-made tools.
Remember
- Δx = x − x₀ is the increment of the argument and Δf = f(x₀ + Δx) − f(x₀) the increment of the function; both are “new value minus old value”.
- Δf / Δx is the average rate of change and equals the slope of the secant through two points of the graph.
- f′(x₀) = lim (Δx→0) Δf / Δx is the instantaneous rate of change; as Δx → 0 the secant turns into the tangent.
- A derivative from the definition takes 3 steps: simplify Δf → cancel Δx in Δf / Δx → let Δx → 0.
- From the definition: C′ = 0, (kx + b)′ = k, (x²)′ = 2x, (x³)′ = 3x², (1/x)′ = −1/x², (√x)′ = 1/(2√x), (ax² + bx + c)′ = 2ax + b.
- A differentiable function is continuous, but not conversely: |x| (a corner) and ∛x (a vertical tangent) are continuous at 0 but not differentiable there.