Skip to main content

Derivatives: from secants to a new function

A straight line has one slope, but a curve can be steep in one place and flatter in another. If we point to just one spot and ask, “How steep is it here?”, can we still calculate a number? The question sounds reasonable. The difficulty is that our familiar slope calculation needs two points, while we want to describe one position.

We do not yet have a way to use one point alone. Let us borrow a nearby point Q and join it to the point P we care about. We can calculate this line’s slope, but it describes the change between P and Q, rather than the change at P alone. In the diagram, keep P where it is and bring Q closer. There is no new formula to memorise yet. Watch the line turn and compare the slope values beside it. These changes will help us find a meaning for the slope at P.

We will use points on a function graph and the idea of approaching from the limits page. If you need a reminder, the horizontal coordinate gives the input, and the vertical coordinate gives its result. A limit describes the value something approaches. The derivative will bring these two ideas together.

Back to mathematics
01

How do we find the slope at a point on a curve?

Let us use f(x)=x2f(x) = x^2: multiply each input by itself to get the height. Keep PP fixed and choose another point QQ on this curve. The solid line through them is called a secant. As QQ gets closer, compare its slope with that of the dashed tangent.

−3−2−1123−2246810120xymPQ = 3.500mtangent = 2.000h = 1.5Δy = 5.25PQDrag P along the curveDrag Q; use the controls for precise movementf(x) = x²
P (x, f(x)) = (1, 1)Q (x+h, f(x+h)) = (2.5, 6.25)
Original functionSecant PQ · solidTangent at P · dashed
01

Read the two changes

h is the signed horizontal change from P to Q; it is negative when Q lies to the left.

Δx=h,Δy=f(x+h)−f(x)\Delta x=h,\qquad\Delta y=f(x+h)-f(x)
02

Use the two-point slope

Divide the vertical change by the horizontal change. This is still the secant slope.

mPQ=ΔyΔx=f(x+h)−f(x)hm_{PQ}=\frac{\Delta y}{\Delta x}=\frac{f(x+h)-f(x)}{h}
03

Take the limit

If the slopes from both sides approach the same finite value, that value is the derivative f′(x)f'(x).

f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}h ≠ 0

Why does x2x^2 give exactly 2x?

Let us calculate the slope before letting Q approach P. We keep x fixed. The second input is x+hx+h, so its height is (x+h)2(x+h)^2. A square means multiplying the whole bracket by itself; each term in the first bracket multiplies each term in the second.

(x+h)2=(x+h)(x+h)=x2+xh+hx+h2=x2+2xh+h2\begin{aligned}(x+h)^2&=(x+h)(x+h)\\&=x^2+xh+hx+h^2\\&=x^2+2xh+h^2\end{aligned}

We want the change in height, so subtract the old height x2x^2. The two x2x^2 terms cancel. Both remaining terms contain h, which we take outside a bracket to make the division possible.

(x+h)2−x2=x2+2xh+h2−x2=2xh+h2=h(2x+h)\begin{aligned}(x+h)^2-x^2&=\cancel{x^2}+2xh+h^2-\cancel{x^2}\\&=2xh+h^2\\&=h(2x+h)\end{aligned}
mPQ=h(2x+h)h=2x+h(h≠0)\begin{aligned}m_{PQ}&=\frac{h(2x+h)}h\\&=2x+h\qquad(h\ne0)\end{aligned}

Q is still separate from P, so h is not zero and dividing by h is allowed. Now let h approach zero from either side. The fixed term 2x stays the same and the extra h approaches zero. For example, at x=1x=1 the secant slopes are 2.1 when h=0.1h=0.1 and 1.9 when h=−0.1h=-0.1. Their common limiting value is 2.

f′(x)=lim⁡h→0(2x+h)=2xf'(x)=\lim_{h\to0}(2x+h)=2x
02

What if we record the slope at every x?

We can now find the slope at a chosen x. To compare slopes at different positions, we can record them on a second graph. Keep the same x, but use the slope as the new height. This gives one point on the new graph. Moving along the original curve and repeating the calculation gives more points.

ORIGINAL FUNCTIONf(x) = x²
−2−11212345670xy(1, 1)
Tangent slope2
DERIVATIVE FUNCTIONf′(x)f'(x) = ?
−2−112−5−4−3−2−1123450xyA blank plane. Each slope will become a height.
Same x. Use the slope as y.(xx, f′(x)f'(x))
1 / 5

At x = 1, the original function's instantaneous slope is 2. The derivative is that slope, so f′(1) = 2: record (1, 2) on the right.

x=1·x=2·x=0·x=-1·x=-2·

One derivative value. A whole derivative function.

f′(1)=2f'(1) = 2 is a number: the slope at x=1x = 1. f′(x)=2xf'(x) = 2x is a function: enter any xx to get the slope there. The original height f(1)=1f(1) = 1 and the slope f′(1)=2f'(1) = 2 are different quantities.

The final line is determined by f′(x)=2xf'(x) = 2x, derived above. A few points alone cannot uniquely determine a curve; the animation uses them to reveal the rule, not to prove it by sampling.