Calculus explainer
From Secant to Tangent
A secant line crosses a graph at two points, P = (a, f(a)) and Q = (a + h, f(a + h)). Slide h toward 0 and watch the secant turn into the tangent line, while its slope closes in on the derivative f′(a).
Drag P to move the point a; drag Q to change h. The sliders do the same with the keyboard.
- the graph of f
- secant line through P and Q
- tangent line at P
- run h and rise f(a+h) − f(a)
Choose
The numbers
- a, a + h
- f(a)
- f(a + h)
- Secant slope
- Tangent slope f′(a)
- Secant − tangent
Slopes as h shrinks
| h | slope with +h | slope with −h |
|---|
What to notice
The secant slope is rise over run: (f(a + h) − f(a)) / h. You cannot put h = 0 into it, because that is 0/0. But you can ask what number the slopes approach as h gets small from both sides. That number is the derivative:
f′(a) = limh→0 (f(a + h) − f(a)) / h
For f(x) = x² the algebra is short: ((a + h)² − a²) / h = 2a + h, so the secant slope is always exactly h more than 2a. Check it in the table.
Both sides, one limit
Compare the columns for +h and −h. Where the graph bends upward, one side comes in from above and the other from below, yet both settle on the same slope. That agreement is what it means for the derivative to exist.
For √x, Q cannot go left of 0: a + h must stay in the domain.
Pierre de Fermat found tangents this way in the 1630s, and Newton and Leibniz built calculus on the idea; the careful limit came from Cauchy and Weierstrass in the 1800s.
Try it
- With f(x) = x² and a = 1.5, predict the secant slope for h = 0.1, then check.
- For x³ − 3x, find two values of a where the tangent line is flat.
- For sin x at a = 0, what do the slopes approach? What does that say about sin h / h?
- For eˣ, compare f(a) with f′(a) at three points. What do you see?
- For √x, move a toward 0.25. What happens to the tangent slope, and why?
Slopes are computed directly from (f(a+h) − f(a))/h with the values shown; the tangent slope uses the exact derivative. No outside code, images or trackers.