Theorem 5.15 — Taylor's theorem
DisprovedRudin.ch05_taylorLet be a real function on , a positive integer, continuous on , and existing for every . Let be points of and let be the Taylor polynomial of at of degree . Then there is a point strictly between and with
For this is the mean value theorem.
import Mathlib open Filter Topology
namespace Rudin
/-- Rudin, Theorem 5.15 (Taylor's theorem): suppose `f` is a real function on `[a, b]`, `n` is
a positive integer, `f^(n-1)` is continuous on `[a, b]` and `f^(n)(t)` exists for every
`t ∈ (a, b)`. Let `α` and `β` be distinct points of `[a, b]` and let `P` be the Taylor
polynomial of degree `n - 1` of `f` at `α`. Then there is a point `x` strictly between `α`
and `β` with `f β = P β + f^(n)(x) (β - α)^n / n!`. -/
theorem ch05_taylor (a b : ℝ) (hab : a < b) (f : ℝ → ℝ) (n : ℕ) (hn : 0 < n)
(hcont : ContinuousOn (iteratedDeriv (n - 1) f) (Set.Icc a b))
(hderiv : ∀ t ∈ Set.Ioo a b, DifferentiableAt ℝ (iteratedDeriv (n - 1) f) t)
(α β : ℝ) (hα : α ∈ Set.Icc a b) (hβ : β ∈ Set.Icc a b) (hne : α ≠ β) :
∃ x : ℝ, ((α < x ∧ x < β) ∨ (β < x ∧ x < α)) ∧
f β = (∑ k ∈ Finset.range n, iteratedDeriv k f α / (k.factorial : ℝ) * (β - α) ^ k)
+ iteratedDeriv n f x / (n.factorial : ℝ) * (β - α) ^ n := by sorry
end RudinRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Let be reals, , and a natural number with . Write for the -th iterated derivative of as a total function on (each application of the derivative operator returns at points where the previous iterate is not differentiable). Assume:
- is continuous on the closed interval ;
- is differentiable at every point of the open interval ;
- with (their order is not specified).
Then there exists a real number lying strictly between and — either or — such that
The sum runs over (so the term is , using and ), and the remainder involves evaluated at the single point . Differentiability of the intermediate iterates for is not assumed explicitly; only the two hypotheses above are imposed, together with the meaning of the iterated-derivative operator as a total function.
Confirmed by the mission captain (proposal self-audit).
Disprovable for n ≥ 2: the hypotheses only constrain iteratedDeriv (n-1) f, and Mathlib's deriv is 0 wherever a function is not differentiable. Take n = 2 and f the indicator function of the rationals: deriv f = 0 is continuous and differentiable, iteratedDeriv 2 f = 0, and the conclusion becomes f β = f α for all α ≠ β in [a,b], which fails for α rational and β irrational. Please add that the lower derivatives are genuine, e.g. ∀ k < n - 1, ∀ t ∈ Set.Icc a b, DifferentiableAt ℝ (iteratedDeriv k f) t.