Chapter 3: Derivatives
3.2 The Derivative as a Function
Study guide for Calculus Volume 1 (Gilbert Strang, 2016 edition)
Independent study guide. Not affiliated with OpenStax or Rice University.
Big idea
So far the derivative has been attached to a point: pick $a$, run a limit, get one number. But nothing in that limit depended on $a$ being a particular value. Leave $a$ as a variable and the same computation produces a rule that assigns a slope to every input where the limit exists. That rule is a function in its own right, and it is the object the rest of calculus works with.
The payoff is that you compute once instead of once per point. One limit calculation turns $f(x) = x^2 - 4x$ into $f'(x) = 2x - 4$, and every tangent slope on that parabola is then a substitution away. It also means the derivative has a graph, and reading that graph against the original is a skill of its own: where $f$ rises, $f'$ is positive; where $f$ turns around, $f'$ crosses zero; where $f$ is steep, $f'$ is far from the axis.
Treating the derivative as a function also raises the question of its domain. The derivative is defined wherever the limit exists, and that set can be smaller than the domain of $f$. The absolute value function is defined everywhere and differentiable everywhere except one point. Cataloguing the ways the limit can fail - a corner, a cusp, a vertical tangent, a break in the graph - tells you what a function must look like to have a derivative at all.
Finally, a function that has a derivative may have a derivative of its own. Differentiating repeatedly produces the second derivative, the third, and so on. The second derivative measures how the rate itself is changing, which is what acceleration is to velocity and what concavity is to slope.
Decoder
The derivative of $f$ is the function whose value at $x$ is the limit of the difference quotient at $x$, and its domain is the set of inputs where that limit exists.
The change from the previous section is one letter: $a$ becomes $x$. Everything else in the limit is identical, including the rule that $h$, not $x$, is the variable doing the approaching. Inside the limit, $x$ is held fixed; it only becomes a variable again once the limit has been taken.
“Where that limit exists” is the working part of the sentence. Existence is a two-sided condition, so a function whose difference quotient tends to one number from the right and another from the left has no derivative there even though both one-sided limits are perfectly well behaved. That is exactly what happens at a corner.
The classic mistake runs the implication backwards. Differentiability forces continuity: a function with a derivative at a point cannot jump there. Continuity does not force differentiability, and the standard counterexample is a corner, where the graph is unbroken but the slope changes abruptly. Continuous is a weaker condition, not an equivalent one.
Definitions and results
The derivative function. For a function $f$, define
$$ f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} $$
at every $x$ for which this limit exists. The set of such $x$ is the domain of $f'$.
Notation. With $y = f(x)$, all of these name the same object: $f'(x)$, $y'$, $\frac{dy}{dx}$, $\frac{d}{dx}f(x)$, and $Df(x)$. The value at a specific input is written $f'(a)$ or $\left.\frac{dy}{dx}\right|_{x=a}$. The Leibniz symbol $\frac{dy}{dx}$ is not a fraction, though it behaves like one often enough to be worth the resemblance.
Reading $f'$ off the graph of $f$. On an interval where $f$ increases, $f' \ge 0$; where $f$ decreases, $f' \le 0$. At a smooth high or low point the tangent is horizontal and $f' = 0$. A linear stretch of $f$ gives a constant stretch of $f'$.
Differentiability on a set. A function is differentiable on an open interval when it is differentiable at every point of that interval. On a closed interval the endpoints are handled with one-sided difference quotients.
Differentiability implies continuity. If $f'(a)$ exists, then $f$ is continuous at $a$. The converse fails, so continuity is a necessary condition for differentiability and not a sufficient one.
Corners. If the difference quotient has different one-sided limits at $a$, the graph has a corner and $f'(a)$ does not exist. The absolute value function at the origin is the standard case.
Cusps and vertical tangents. If the difference quotient tends to $\infty$ or $-\infty$, there is no derivative even though the graph may be unbroken. When both sides run to the same infinity the curve has a vertical tangent, as $x^{1/3}$ does at the origin; when they run to opposite infinities the curve has a cusp, as $x^{2/3}$ does.
Discontinuities. A jump, a removable hole, or an infinite discontinuity at $a$ rules out $f'(a)$ immediately, by the implication above.
Higher order derivatives. Differentiating $f'$ gives $f''$, differentiating again gives $f'''$, and past the third the count goes in parentheses: $f^{(4)}$, $f^{(n)}$. In Leibniz notation these are $\frac{d^2y}{dx^2}$ and $\frac{d^ny}{dx^n}$. If $s(t)$ is position, $s'(t)$ is velocity and $s''(t)$ is acceleration.
Worked examples
A derivative function from the definition
Let $f(x) = x^2 - 4x$. Hold $x$ fixed and expand:
$$ \frac{f(x+h) - f(x)}{h} = \frac{(x^2 + 2xh + h^2) - 4x - 4h - x^2 + 4x}{h} = \frac{2xh + h^2 - 4h}{h} $$
Cancelling $h$ leaves $2x + h - 4$, so $f'(x) = 2x - 4$. Check it against the shape of the graph: the parabola has its lowest point at $x = 2$, and $f'(2) = 0$. To the left of $2$ the derivative is negative and the graph falls; to the right it is positive and the graph rises.
A derivative function for a reciprocal
Let $g(x) = \dfrac{1}{x + 1}$. Combine the two fractions in the numerator over a common denominator:
$$ \frac{g(x+h) - g(x)}{h} = \frac{1}{h}\cdot\frac{(x+1) - (x + h + 1)}{(x + h + 1)(x+1)} = \frac{-h}{h\,(x + h + 1)(x+1)} $$
Cancelling $h$ and letting $h \to 0$ gives
$$ g'(x) = \frac{-1}{(x+1)^2} $$
The domain of $g$ excludes $x = -1$, and so does the domain of $g'$. The derivative is negative everywhere else, matching the fact that $g$ decreases on each side of its vertical asymptote.
Three ways the limit fails
For $f(x) = |2x - 6|$, the graph has a corner at $x = 3$, where $f(3) = 0$. The difference quotient there is $|2h|/h$, which equals $2$ for every $h > 0$ and $-2$ for every $h < 0$. The one-sided limits disagree, so $f'(3)$ does not exist, even though $f$ is continuous at $3$.
For $g(x) = x^{1/3}$ at the origin, the difference quotient is $h^{1/3}/h = h^{-2/3}$, which tends to $\infty$ from both sides. No derivative, and the graph has a vertical tangent.
For $k(x) = x^{2/3}$ at the origin, the quotient is $h^{2/3}/h = h^{-1/3}$, which tends to $\infty$ from the right and $-\infty$ from the left. That is a cusp. All three functions are continuous at the bad point, which is the whole content of the warning that continuity is not enough.
Repeated differentiation
Let $f(x) = x^3 - 2x$. From the definition,
$$ \frac{(x+h)^3 - 2(x+h) - x^3 + 2x}{h} = \frac{3x^2h + 3xh^2 + h^3 - 2h}{h} = 3x^2 + 3xh + h^2 - 2 $$
so $f'(x) = 3x^2 - 2$. Running the same limit on $f'$ gives $\frac{3(x+h)^2 - 3x^2}{h} = 6x + 3h$, so $f''(x) = 6x$. One more pass gives $f'''(x) = 6$, a constant, and therefore $f^{(4)}(x) = 0$ and every derivative after it is zero as well. A cubic runs out of derivatives after four steps, which is a useful check on any higher derivative of a polynomial: each one drops the degree by one.
Practice
First the definition again, now solved for a general $x$ instead of a fixed point. The answer is a formula, and its domain is part of the answer.
Practice
Generated problems for this section, graded instantly.
Next, existence. These ask where a function is differentiable and why it fails where it fails, using one-sided difference quotients to decide.
Practice
Generated problems for this section, graded instantly.
Last, iteration. Differentiate, then differentiate the result, keeping track of which derivative you are on.
Practice
Generated problems for this section, graded instantly.
Quiz
Six items on computing derivative functions from the definition, diagnosing where differentiability fails, and second and higher derivatives.
Quiz
6 problems with a score at the end.