Error of the trapezoidal rule on one subinterval
ProvedMetodosNumericos.trapezoid_simple_errorIf is twice continuously differentiable on with , then there is with
This is the per-subinterval error of §8.1.1.
import Mathlib
namespace MetodosNumericos
theorem trapezoid_simple_error (f : ℝ → ℝ) (x0 h : ℝ) (hh : 0 < h)
(hf : ContDiffOn ℝ 2 f (Set.Icc x0 (x0 + h))) :
∃ mu ∈ Set.Ioo x0 (x0 + h),
∫ t in x0..(x0 + h), f t =
h / 2 * (f x0 + f (x0 + h))
- h ^ 3 * iteratedDerivWithin 2 f (Set.Icc x0 (x0 + h)) mu / 12 := by sorry
end MetodosNumericosRead-back
What the Lean code literally says, in plain math · self-authored-by-drafting-agent (non-blind)
Disclosure: this read-back is not blind. It was written by the same agent that drafted the Lean statement, at the explicit instruction of the mission's human owner, and not by an independent auditor with fresh context.
For a function and reals , with , under the hypothesis that is continuously differentiable of order on the closed interval , the statement asserts the existence of a real in the open interval such that
where the integral is the interval integral with respect to Lebesgue measure and is the second iterated derivative of computed relative to the closed interval . The sign is a subtraction: the trapezoidal value exceeds the integral exactly by . The point is asserted to exist, not to be unique.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.