1. Motivation: Two Classic Problems, One Mathematical Object
Suppose a car's position at time $t$ is given by $s(t)$. Over a time interval $[a, a+h]$, the average velocity is:
$$v_{\text{avg}} = \frac{s(a+h) - s(a)}{h}$$
As we shrink the interval — letting $h \to 0$ — the average velocity over shorter and shorter intervals approaches the instantaneous velocity at time $t = a$:
$$v(a) = \lim_{h \to 0} \frac{s(a+h) - s(a)}{h}$$
Given a curve $y = f(x)$, draw a secant line through two points $(a, f(a))$ and $(a+h, f(a+h))$. Its slope is:
$$m_{\text{sec}} = \frac{f(a+h) - f(a)}{h}$$
As $h \to 0$, the second point slides toward the first, and the secant line rotates into the tangent line. The slope of the tangent is:
$$m_{\text{tan}} = \lim_{h \to 0} \frac{f(a+h) - f(a)}{h}$$
Interactive: Watch the Secant Line Approach the Tangent Line
Drag the slider to shrink $h$ toward 0 and see the secant line become the tangent line.
2. The Definition of the Derivative
Let $f$ be defined on an open interval containing $a$. The derivative of $f$ at $a$ is
$$f'(a) = \lim_{h \to 0} \frac{f(a+h) - f(a)}{h}$$
provided this limit exists. Equivalently, setting $x = a + h$:
$$f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a}$$