The Derivative
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn the definition of the derivative as a limit, prove that differentiability implies continuity, see why the converse fails badly, and meet the interior extremum theorem that the next lesson depends on.
The Concept
Section titled “The Concept”The definition
Section titled “The definition”is differentiable at if
exists as a real number.
Equivalently, with :
The quotient is the slope of the secant through and . The derivative is the limit of those slopes.
Note what the limit definition buys. At the quotient is , undefined. This is exactly why the limit definition excluded the point itself - if it had required a value at , the derivative could not exist. That design decision, made in the limits lesson, was made for this.
Requiring the limit to be a real number rules out . For at 0 the quotient is , so is not differentiable there, even though the graph has a well-defined vertical tangent.
Differentiability implies continuity
Section titled “Differentiability implies continuity”If is differentiable at then is continuous at .
Proof. For write
As , the first factor tends to , a finite number, and the second tends to 0. By the product rule for limits,
so , which is continuity. ∎
Finiteness of is essential. If the quotient blew up, multiplying by something tending to 0 would be indeterminate rather than 0.
The converse fails, spectacularly
Section titled “The converse fails, spectacularly”is continuous at 0 and not differentiable there. The one-sided quotients are
Different, so the two-sided limit does not exist. A corner destroys differentiability while leaving continuity intact.
You can do far worse. The Weierstrass function
is continuous everywhere and differentiable nowhere. Published in 1872, it demolished the widespread belief that a continuous curve must have tangents except at isolated points. The series converges uniformly, which gives continuity; the frequencies grow fast enough that no secant slope settles.
So the implication is strictly one-way, and by a wide margin: continuity is a much weaker condition than it feels.
Differentiable but with discontinuous derivative
Section titled “Differentiable but with discontinuous derivative”Even having a derivative everywhere is not the end of the hierarchy. Let
At 0 the quotient is , bounded by , so by squeezing : differentiable at 0.
For , the product and chain rules give
which oscillates without limit as . So exists everywhere and is discontinuous at 0.
Hence (continuously differentiable) is strictly stronger than differentiable. The hierarchy is
The interior extremum theorem
Section titled “The interior extremum theorem”If has a local maximum or minimum at an interior point and exists, then .
Proof (maximum case). For small , , so , and the right-hand limit gives .
For small the same numerator is while , so the quotient is , and the left-hand limit gives .
Both hold, so . ∎
Two words carry the weight.
Interior. On the function has a maximum at with . Endpoints only give a one-sided inequality.
Exists. has a minimum at 0 with no derivative there.
And the converse fails: for , which has no extremum at 0. A vanishing derivative is necessary, not sufficient - these are critical points, and classifying them needs more.
This theorem is the bridge to the next lesson: Rolle’s theorem uses EVT to produce an interior extremum, then this result to conclude the derivative vanishes there.
Worked Examples
Section titled “Worked Examples”Example 1: Compute for from the definition.
Solution.
The cancellation is legal because in the limit. Then
∎
Example 2: Show is not differentiable at 0.
Solution. The quotient at is , which equals for and for .
The one-sided limits differ, so the limit does not exist and is not differentiable at 0. It is continuous there, so continuity does not imply differentiability. ∎
Example 3: A vertical tangent is not a derivative.
Is differentiable at 0?
Solution.
The limit is not a real number, so is not differentiable at 0, despite the graph having a clean vertical tangent there.
The definition demands a finite limit. Note is continuous at 0 and even strictly increasing, so plenty of good behaviour does not add up to differentiability.
Example 4: Differentiable with a discontinuous derivative.
For (and ), verify and that is discontinuous at 0.
Solution. At 0:
so by squeezing . ✓
For , . The first term , but oscillates through with no limit, so does not exist.
exists everywhere and is not continuous at 0. So differentiable is strictly weaker than . ∎
Example 5: A one-sided derivative.
Does have a derivative at 0 on ?
Solution. Only the right side is available:
Not finite, so no derivative at 0, one-sided or otherwise.
This is why is not Lipschitz on , as the previous lesson found: the slope is unbounded near 0. The two facts are the same observation.
Example 6: The interior extremum theorem in action.
Find where can have local extrema on .
Solution. is differentiable everywhere, so any local extremum has :
Candidates are and . Checking: changes from positive to negative at (local max) and negative to positive at (local min).
The theorem narrows infinitely many points to two. That’s its job - it does not confirm extrema, it eliminates everything else.
Example 7: A critical point that is not an extremum.
Solution. For , , so 0 is a critical point.
But is strictly increasing: for . So has no extremum at 0; it is an inflection point.
A vanishing derivative is necessary, not sufficient. This is why the first and second derivative tests exist.
Real-World Applications
Section titled “Real-World Applications”Instantaneous rates. Velocity is the derivative of position, current is the derivative of charge, and marginal cost is the derivative of total cost. In every case the quantity is defined as a limit, which is why “instantaneous” is meaningful at all rather than a contradiction.
Optimization and gradient methods. Setting the derivative to zero to find candidates is the interior extremum theorem. Gradient descent follows the derivative downhill, and it requires differentiability - which is why ReLU networks, having corners, need subgradients and why that choice has real consequences for training.
Numerical differentiation. A finite difference approximates the limit with a small . Too large and truncation error dominates; too small and floating-point cancellation does. The optimal is around , a direct practical consequence of the limit being approached and not reached.
Sensitivity analysis. The derivative of an output with respect to an input is the amplification factor for small errors, which is what condition numbers measure. A large derivative means a badly conditioned problem.
Rough signals and financial models. Brownian motion paths are continuous and nowhere differentiable, which is the Weierstrass phenomenon appearing in nature. That is exactly why stochastic calculus exists: ordinary calculus cannot differentiate a stock price path.
Machine learning and non-smooth losses. The absolute-value loss is not differentiable at 0, so optimizers use subgradient methods there. Choosing between squared and absolute loss is partly a choice about whether you want differentiability.
Retrying will remove your ✅ checkmark until you pass again.