11. Mean Value Theorem and Taylor Expansion — Imitating Functions with Polynomials
Calculus 3/5. The real utility of differentiation is "controlling the behavior of an entire function with one derivative." The mean value theorem is that control mechanism, and repeatedly applying it to reconstruct a function as a polynomial gives the Taylor expansion. Approximation theory, optimization, and the proof of the CLT all begin here.
Rolle's theorem → mean value theorem
Rolle's theorem: if is continuous on , differentiable on , and , then some satisfies . (If both ends have the same height, there is a horizontal tangent somewhere.)
Mean Value Theorem (MVT): under the same conditions, even when , some satisfies
This means there is a tangent somewhere with the same slope as the secant. The proof ends by subtracting the secant from and reducing the problem to Rolle's theorem.
Immediate consequences of the MVT
- Sign of the derivative ⟹ monotonicity: if on an interval, is strictly increasing. ()
- ⟹ constant: "functions with the same derivative differ by a constant" follows here, and the in an indefinite integral is a consequence of this theorem.
- Lipschitz control: if , then . This single inequality controls every variation in function values with a derivative bound, and it is the standard -smoothness assumption in convergence proofs for gradient descent.
L'Hôpital's rule
For limits of the form or ,
This is a consequence of Cauchy's mean value theorem (the two-function version of the MVT). Once Taylor expansion below becomes familiar, however, most limits can be read immediately by "expanding and comparing the lowest-order terms" without L'Hôpital's rule.
Taylor's theorem
If is times differentiable, then near ,
( is some point between and .) When , this is exactly the MVT—Taylor's theorem is the higher-order extension of the MVT.
The key message: because the remainder is controlled by , as approaches , the polynomial approximation improves at the rate of its order.
Why the coefficient is
is "the unique degree- polynomial whose derivatives through order all agree with at ." Since , division by is required for the derivatives to match. The factorial from the Gamma function page again serves as a normalization constant here.
Five expansions to memorize
Around :
Examples of use—moments when they actually appear in probability and ML:
- : log return ≈ simple return, and the origin of small-sample correction terms.
- : compound interest → continuous compounding, (Poisson limit).
- The heart of the CLT proof (Part 4): expand the characteristic function to second order, . Without Taylor expansion, the proof of the CLT cannot begin.
- Linearizing sigmoid and softmax; analyzing local behavior of activation functions.
Second-order expansion — the language of optimization
Optimization most often uses the expansion through second order:
- At a point where (a critical point), the first-order term vanishes and the second-order term dominates— gives a minimum, and gives a maximum. This is the second-order condition in Part 5.
- Newton's method chooses the next step by matching through the second-order term: .
- In statistics, a second-order expansion of the log-likelihood leads to the Laplace approximation (approximating the posterior with a Gaussian) and Fisher information. The fact that "expanding the log density to second order near its maximum produces a Gaussian" is another route demonstrating the universality of the Gaussian.
Big-O / little-o
The standard vocabulary for expressing approximation precision (as ):
| Notation | Meaning | Example |
|---|---|---|
| is bounded | ||
| Differentiability: | ||
| Stirling: |
The claim in Part 1 that the central difference is better than the forward difference follows immediately by subtracting two Taylor expansions:
Pitfalls of Taylor series
The series as does not always converge to the original function.
- Radius of convergence: is valid only for . Using the expansion outside that radius is simply wrong.
- Smooth but non-analytic functions: for (), every derivative at the origin is 0, so its Taylor series is identically 0, but the function itself is not 0. "Even knowing every derivative may not reveal the function."
- In contrast, for objects with good properties such as characteristic functions, a local expansion determines the entire distribution—see Part 2 for the contrast with the moment problem.
Summary
- The MVT is a mechanism for "controlling changes in function values through derivatives"—monotonicity, Lipschitz bounds, and all follow from it.
- Taylor's theorem is the higher-order extension of the MVT, and the remainder guarantees approximation quality.
- The five expansions are reused everywhere, from the CLT proof to numerical-stability tricks.
- Second-order expansion is a shared language of optimization (Newton, second-order conditions) and statistics (Laplace approximation, Fisher information).