Definition and geometry of the derivative
From the slope between two points to the rate of change at one instant.
The idea
A secant line joins two points on a graph. Its slope is an average rate of change: change in output divided by change in input. Move the second point toward the first. If the secant slopes approach one finite value, that value is the derivative—the slope of the tangent line and the instantaneous rate of change.
The derivative is a limit of slopes, not a quotient obtained by setting the increment to zero.
Notation and the derivative function
The number \(f^{\prime}(a)\) is a rate at one input. Allowing the input to vary gives the derivative function \(f^{\prime}(x)\). Its domain consists of the inputs where the derivative exists as a finite number; it can be smaller than the domain of \(f\).
For \(y=f(x)\), the notations \(f^{\prime}(x)\), \(y^{\prime}\), \(dy/dx\), and \(\frac{d}{dx}f(x)\) describe the same derivative. In \(dy/dx\), the denominator names the variable with respect to which we differentiate; this notation is not a quotient of two function values.
Slope, rate, and units
The derivative has units of output per unit input. If \(s(t)\) is position in metres and time is in seconds, \(s^{\prime}(t)\) is instantaneous velocity in metres per second. If \(T(t)\) is temperature, \(T^{\prime}(t)\) tells us how quickly it is heating or cooling.
When the derivative exists, the tangent line at \(a\) is
\[y=f(a)+f^{\prime}(a)(x-a).\]Near the point of tangency, this line also gives a local linear approximation:
\[f(a+h)\approx f(a)+f^{\prime}(a)h.\]This is an approximation for small increments; the tangent need not match the curve far away. A tangent may cross a curve—it is defined by its limiting slope, not by touching the curve only once.
Worked examples
Example 1
From first principles
Find the derivative of \(f(x)=x^2\) at \(a\) using the definition. For \(h\ne0\),
\[\frac{(a+h)^2-a^2}{h}=\frac{2ah+h^2}{h}=2a+h.\]Now take the limit:
\[f^{\prime}(a)=\lim_{h\to0}\frac{(a+h)^2-a^2}{h}=\lim_{h\to0}(2a+h)=2a.\]Thus the derivative function is \(f^{\prime}(x)=2x\) for every real \(x\). At \(a=1\), the tangent has slope \(2\) and equation
\[y=1+2(x-1)=2x-1.\]This is the tangent in the widget.
Example 2
Velocity at an instant
A cart has position \(s(t)=5t^2\) metres, with time measured in seconds. Its average velocity from \(2\) to \(2+h\) is
\[\frac{s(2+h)-s(2)}{h}=\frac{5(2+h)^2-20}{h}=20+5h.\]Take the limit to obtain the instantaneous velocity:
\[s^{\prime}(2)=\lim_{h\to0}\frac{s(2+h)-s(2)}{h}=\lim_{h\to0}(20+5h)=20\,\mathrm{m/s}.\]Its position is \(s(2)=20\,\mathrm{m}\); the equal numerical values represent different physical quantities.
Example 3
A local prediction
A cooling sample has \(T(5)=60\,{}^\circ\mathrm{C}\) and \(T^{\prime}(5)=-2.4\,{}^\circ\mathrm{C/min}\). Estimate its temperature after another \(0.1\) minutes:
\[T(5.1)\approx T(5)+T^{\prime}(5)(0.1)=60-0.24=59.76\,{}^\circ\mathrm{C}.\]The negative derivative means cooling. It does not mean a negative temperature, and the estimate assumes that the tangent remains a useful approximation over this short interval.
When a derivative fails to exist
Continuity rules out breaks, but a continuous graph can still fail to have a finite tangent slope.
For \(f(x)=\lvert x\rvert\) at \(0\), the difference quotient is
\[\frac{\lvert h\rvert-0}{h}=\begin{cases}-1,&h<0,\\1,&h>0.\end{cases}\]The one-sided limits are
\[\lim_{h\to0^-}\frac{\lvert h\rvert}{h}=-1,\qquad \lim_{h\to0^+}\frac{\lvert h\rvert}{h}=1.\]The left and right slopes disagree, so the graph has a corner and no derivative there, even though it is continuous.
A different failure occurs for \(g(x)=\sqrt[3]{x}\) at \(0\). For \(h\ne0\),
\[\frac{g(h)-g(0)}h=\frac{\sqrt[3]{h}}h=\frac1{(\sqrt[3]{h})^2}.\]The denominator approaches zero through positive values, so
\[\lim_{h\to0}\frac{g(h)-g(0)}h=+\infty.\]There is a vertical tangent, the line \(x=0\), but no finite derivative. This differs from a corner: the secants become vertical rather than approaching two different finite slopes.
Theorem
Differentiability implies continuity
If \(f\) is differentiable at \(a\), it is continuous there. The converse is false, as the corner shows.
Proof (optional)
For \(h\ne0\),
\[f(a+h)-f(a)=\frac{f(a+h)-f(a)}{h}\,h.\]Taking limits gives
\[\lim_{h\to0}\bigl(f(a+h)-f(a)\bigr)=\left(\lim_{h\to0}\frac{f(a+h)-f(a)}{h}\right)\left(\lim_{h\to0}h\right)=f^{\prime}(a)\cdot0=0.\]Thus \(\lim_{h\to0}f(a+h)=f(a)\), which is continuity at \(a\).