The Derivative, Explained: From Average Speed to Instant Speed
Your car's speedometer shows a number at every instant, yet speed is "distance divided by time", and in a single instant you travel no distance at all. Resolving this puzzle is exactly what the derivative does. This post builds the idea from scratch, shows what it means geometrically, and collects the basic rules for computing it.
1. Increments and the average rate of change
Take a function \(y = f(x)\). When the argument changes from \(x = x_1\) to \(x = x_2\), we name the two changes involved:
Definitions
\( \Delta x = x_2 - x_1 \) is the increment of the independent variable;
\( \Delta y = f(x_1 + \Delta x) - f(x_1) \) is the increment of the function;
the quotient \( \dfrac{\Delta y}{\Delta x} \) is the average rate of change of \(f\) on the interval \((x_1, x_1 + \Delta x)\).
If \(f(t)\) is the distance a car has travelled after \(t\) hours, then \( \frac{\Delta f}{\Delta t} \) is its average speed over that time interval: 150 km in 2 hours is 75 km/h on average, even if the car sometimes went faster and sometimes stopped.
Geometrically, \( \frac{\Delta y}{\Delta x} \) is the slope of the secant line through the two points of the graph
Figure 1. The secant through \(M_1\) and \(M_2\) has slope \( \frac{\Delta y}{\Delta x} \). As \(M_2\) slides towards \(M_1\), the secant turns into the tangent.
2. The definition of the derivative
To get the instantaneous rate of change, make the interval shorter and shorter. The point \(M_2\) slides along the curve towards \(M_1\), and the average rate approaches a single number.
Definition · Derivative
The limit of the quotient \( \frac{\Delta y}{\Delta x} \) as \( \Delta x \to 0 \), if it exists, is called the (first) derivative of \(y = f(x)\) at \(x = x_1\):
\[ y' = \lim_{\Delta x\to 0}\frac{\Delta y}{\Delta x} = \lim_{\Delta x\to 0}\frac{f(x_1 + \Delta x) - f(x_1)}{\Delta x} = f'(x_1). \]
At an arbitrary point \(x\):
\[ y' = \lim_{\Delta x\to 0}\frac{f(x + \Delta x) - f(x)}{\Delta x} = f'(x). \]
Other notations: \( y' = \dfrac{dy}{dx} \) (Leibniz's notation).
Why can't we simply put \(\Delta x = 0\)? Because we'd get \( \frac{0}{0} \). The whole art is to simplify the quotient first, so that \(\Delta x\) cancels, and only then let it go to zero.
Example 1 · \( (x^2)' = 2x \)
\[ \frac{(x + \Delta x)^2 - x^2}{\Delta x} = \frac{2x\,\Delta x + (\Delta x)^2}{\Delta x} = 2x + \Delta x \;\xrightarrow{\ \Delta x\to 0\ }\; 2x. \]
So for \( f(x) = x^2 \) the slope at \(x = 3\) is \(6\), at \(x = -1\) it is \(-2\), and at \(x = 0\) the graph is flat.
Example 3 · \( (\sin x)' = \cos x \)
Using \( \sin A - \sin B = 2\cos\frac{A+B}{2}\sin\frac{A-B}{2} \):
\[ \frac{\sin(x + \Delta x) - \sin x}{\Delta x} = \cos\Big(x + \frac{\Delta x}{2}\Big)\cdot\frac{\sin(\Delta x/2)}{\Delta x/2} \;\longrightarrow\; \cos x\cdot 1, \]
by the famous limit \( \lim_{t\to0}\frac{\sin t}{t} = 1 \).
3. Geometric meaning: the tangent line
As \(M_2 \to M_1\), the secant line rotates into the tangent line at \(M_1\). Its slope is the limit of the secant slopes, which is precisely the derivative:
Geometric meaning
\[ y' = \operatorname{tg}\alpha = k, \]
where \(k\) is the slope of the tangent to the curve \(y = f(x)\) at the point \(x\), and \(\alpha\) is the angle the tangent makes with the positive \(x\)-axis.
This gives the equation of the tangent line at the point \( (x_0, f(x_0)) \):
\[ y - f(x_0) = f'(x_0)\,(x - x_0). \]
The sign of the derivative tells you the shape of the graph locally: \(f' > 0\) means the curve rises, \(f' < 0\) means it falls, \(f' = 0\) means a horizontal tangent (a candidate for a maximum or minimum).
Example 4 · Tangent line
Tangent to \( y = x^2 \) at \(x_0 = 3\): \( f(3) = 9 \), \( f'(3) = 6 \), so
\[ y - 9 = 6(x - 3) \quad\Longleftrightarrow\quad y = 6x - 9. \]
The tangent makes the angle \( \alpha = \operatorname{arctg}6 \approx 80.5^\circ \) with the \(x\)-axis.
4. One-sided derivatives and continuity
Sometimes the curve approaches a point differently from the left and from the right. To capture this, we let \(\Delta x\) approach zero from one side only.
Left and right derivatives
\[ f'_-(x) = \lim_{\Delta x\to -0}\frac{f(x + \Delta x) - f(x)}{\Delta x}, \qquad f'_+(x) = \lim_{\Delta x\to +0}\frac{f(x + \Delta x) - f(x)}{\Delta x} \]
are the left and right derivatives at \(x\). The derivative \(f'(x)\) exists if and only if both one-sided derivatives exist and
\[ f'_-(x) = f'_+(x). \]
Example 5 · A corner: \( f(x) = |x| \) at \(x = 0\)
\[ \frac{|0 + \Delta x| - |0|}{\Delta x} = \frac{|\Delta x|}{\Delta x} = \begin{cases} 1, & \Delta x > 0,\\ -1, & \Delta x < 0. \end{cases} \]
So \( f'_+(0) = 1 \) and \( f'_-(0) = -1 \). They differ, so \(|x|\) has no derivative at \(0\). Geometrically, the graph has a corner there: from the right it looks like a line of slope 1, from the left like a line of slope \(-1\), and no single tangent fits.
Differentiable implies continuous
Necessary condition
For \(f'(x)\) to exist, the function must be continuous at \(x\).
Why: write \( \Delta y = \frac{\Delta y}{\Delta x}\cdot\Delta x \). If the derivative exists, the first factor tends to \(f'(x)\) and the second to \(0\), so \( \Delta y \to f'(x)\cdot 0 = 0 \). That is exactly continuity: a small change in \(x\) gives a small change in \(y\).
The converse is false
Continuity is necessary but not sufficient. \(|x|\) is continuous at \(0\) but not differentiable there (Example 5). Remember the logic:
\[ \text{differentiable} \;\Longrightarrow\; \text{continuous}, \qquad \text{continuous} \;\not\Longrightarrow\; \text{differentiable}. \]
On the other hand, a function that jumps (for example the sign function at \(0\)) can never be differentiable at the jump.
5. Infinite derivatives and vertical tangents
Infinite derivative
If \(f\) is continuous at \(x\) and
\[ \lim_{\Delta x\to 0}\frac{f(x + \Delta x) - f(x)}{\Delta x} = +\infty \ \text{ or } \ -\infty, \]
we say that \(f\) has an infinite derivative at \(x\). In that case the tangent to the curve at that point is perpendicular to the \(x\)-axis (vertical).
Example 6 · \( f(x) = \sqrt[3]{x} \) at \(x = 0\)
\[ \frac{\sqrt[3]{\Delta x} - 0}{\Delta x} = \frac{1}{\sqrt[3]{(\Delta x)^2}} \;\longrightarrow\; +\infty \quad (\Delta x \to 0, \text{ from both sides}). \]
The graph passes through the origin with a vertical tangent, the \(y\)-axis. (Since \(\operatorname{tg}\alpha \to \infty\), the angle is \(\alpha = 90^\circ\).)
Not every vertical tangent is an infinite derivative
For \( f(x) = \sqrt[3]{x^2} \), the quotient is \( \frac{1}{\sqrt[3]{\Delta x}} \), which tends to \(+\infty\) from the right and \(-\infty\) from the left. The one-sided limits have different signs, so this is not an infinite derivative in the sense above: the graph has a cusp (a sharp point) at the origin.
6. The basic rules of differentiation
Computing every derivative from the definition would be tiresome. Instead, we prove a few rules once and then combine them.
Rules
Let \(c\) be a constant, and let \(u = \varphi(x)\) and \(v = \psi(x)\) be functions that have derivatives. Then:
The last term vanishes because \(v\) is continuous (it is differentiable), so \(\Delta v \to 0\). Picture a rectangle with sides \(u\) and \(v\): when both sides grow a little, the area grows by two thin strips \(v\,\Delta u\) and \(u\,\Delta v\), plus a tiny corner \(\Delta u\,\Delta v\) that becomes negligible.
Common mistakes
The derivative of a product is not the product of derivatives: \( (uv)' \ne u'v' \). Check with \(u = v = x\): \( (x^2)' = 2x \), but \( (x)'(x)' = 1 \).
In the quotient rule, the order in the numerator matters: \( u'v - v'u \), not \( v'u - u'v \). A memory aid: "derivative of the top first".
Example 7 · Combining the rules
From the product rule, \( (x^2)' = (x\cdot x)' = 1\cdot x + 1\cdot x = 2x \), and by induction \( (x^n)' = nx^{n-1} \). Then:
\[ (3x^4 - 5x^2 + 7)' = 3\cdot4x^3 - 5\cdot2x + 0 = 12x^3 - 10x. \]
Example 8 · Product rule
\[ (x^2\sin x)' = (x^2)'\sin x + (\sin x)'x^2 = 2x\sin x + x^2\cos x. \]
Example 9 · \( (\operatorname{tg}x)' = \frac{1}{\cos^2x} \)
With \( (\cos x)' = -\sin x \) and the quotient rule:
\[ \left(\frac{\sin x}{\cos x}\right)' = \frac{\cos x\cdot\cos x - (-\sin x)\sin x}{\cos^2x} = \frac{\cos^2x + \sin^2x}{\cos^2x} = \frac{1}{\cos^2x}. \]
Problem 3: Let \( f(x) = x \) for \(x \ge 0\) and \( f(x) = x^2 \) for \(x < 0\). Does \(f'(0)\) exist?
\( f'_+(0) = \lim_{\Delta x\to+0}\frac{\Delta x}{\Delta x} = 1 \), \( f'_-(0) = \lim_{\Delta x\to-0}\frac{(\Delta x)^2}{\Delta x} = 0 \). They differ, so \(f'(0)\) does not exist, even though \(f\) is continuous at \(0\).
Problem 4: Differentiate \( y = \dfrac{x^2 + 1}{x - 1} \).
Problem 7: At which point is the tangent to \( y = x^2 - 4x + 1 \) horizontal?
\( y' = 2x - 4 = 0 \Rightarrow x = 2 \), \( y = 4 - 8 + 1 = -3 \). The tangent is horizontal at \((2, -3)\), the vertex of the parabola.
Final thoughts
The derivative answers one question: how fast is something changing right now? Algebraically it is the limit of average rates; geometrically it is the slope of the tangent; physically it is velocity, growth rate, marginal cost. Learn the definition well enough to compute a few derivatives by hand, understand when it fails (jumps, corners, cusps), and then let the rules do the routine work.