Taylor's Theorem
Statement
If is times differentiable on an open interval containing , then for any in that interval:
Lagrange remainder: There exists between and such that:
The theorem gives a polynomial approximation to near with a rigorous bound on the error.
Visualization
Approximating near using Taylor polynomials of increasing degree:
| Taylor polynomial | error vs | ||
|---|---|---|---|
| 1 | 0.5000 | 0.0206 | |
| 3 | 0.4792 | 0.0002 | |
| 5 | 0.47943 | ||
| 7 | 0.479426 |
The Lagrange remainder for at : , shrinking rapidly as grows.
sin(x) — exact
T₁(x) ……… degree 1
T₃(x) - - degree 3
T₅(x) --- degree 5
1 | .--sin
| / T₅ ≈ sin here
| /
0 +-------> x
|
-1 |
Proof Sketch
- Base case (): Directly apply the Mean Value TheoremMean Value TheoremThere exists a point where the instantaneous rate of change equals the average rate of changeRead more → — .
- Induction: Assume approximates with remainder .
- Apply the Fundamental Theorem of CalculusFundamental Theorem of CalculusIntegration and differentiation are inverse operationsRead more →: Write .
- Lagrange form: Apply the MVT to the integral representation of using the weight function . A exists with the Lagrange form of the remainder.
- Conclude: The remainder where .
Connections
- Mean Value TheoremMean Value TheoremThere exists a point where the instantaneous rate of change equals the average rate of changeRead more → — the base case and the Lagrange remainder step both use MVT
- Fundamental Theorem of CalculusFundamental Theorem of CalculusIntegration and differentiation are inverse operationsRead more → — the integral remainder representation of comes from FTC applied times
- Chain RuleChain RuleDifferentiate composite functions by peeling layersRead more → — used when computing for composite functions
- L’Hôpital's Rule — Taylor expansions provide an alternative route to L'Hôpital-type limits
- Intermediate Value TheoremIntermediate Value TheoremA continuous function on a closed interval hits every value between its endpointsRead more → — continuity required for invokes IVT-like arguments
Lean4 Proof
import Mathlib.Analysis.Calculus.Taylor
open Set
/-- Taylor's theorem with the Lagrange remainder: there exists `c ∈ (x₀, x)` such that
the error between `f(x)` and the degree-`n` Taylor polynomial at `x₀` is
`f^(n+1)(c) · (x - x₀)^(n+1) / (n+1)!`.
Wraps Mathlib's `taylor_mean_remainder_lagrange`. -/
theorem taylor_lagrange_remainder {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ}
(hx : x₀ < x)
(hf : ContDiffOn ℝ n f (Icc x₀ x))
(hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x)) :
∃ c ∈ Ioo x₀ x,
f x - taylorWithinEval f n (Icc x₀ x) x₀ x =
iteratedDerivWithin (n + 1) f (Icc x₀ x) c * (x - x₀) ^ (n + 1) / (n + 1)! :=
taylor_mean_remainder_lagrange hx hf hf'Referenced by
- Cauchy's Mean Value TheoremCalculus
- Rolle's TheoremCalculus
- L'Hôpital's RuleCalculus
- Fundamental Theorem of CalculusCalculus
- Intermediate Value TheoremCalculus
- Mean Value TheoremCalculus
- Cauchy Integral FormulaComplex Analysis
- Lagrange InterpolationLinear Algebra
- Stirling's ApproximationCombinatorics
- Stone–Weierstrass TheoremFunctional Analysis
- Spectral Radius FormulaFunctional Analysis