Lagrange interpolation error formula
ProvedMetodosNumericos.lagrange_interpolation_errorLet lie in and let be times continuously differentiable on . Then for every different from all nodes there is with
where is the Lagrange interpolating polynomial of at the nodes. This is Proposição 7.3.1.
import Mathlib import Definitions.Def_MetodosNumericos_interpolacaoDefs
namespace MetodosNumericos
theorem lagrange_interpolation_error {n : ℕ} (f : ℝ → ℝ) (a b : ℝ) (xs : Fin (n + 1) → ℝ)
(hxs : StrictMono xs) (hmem : ∀ i, xs i ∈ Set.Ioo a b)
(hf : ContDiffOn ℝ (n + 1 : ℕ) f (Set.Ioo a b))
(x : ℝ) (hx : x ∈ Set.Ioo a b) (hne : ∀ i, x ≠ xs i) :
∃ xi ∈ Set.Ioo a b,
f x = lagrangeInterp xs (fun i => f (xs i)) x +
(∏ k : Fin (n + 1), (x - xs k)) *
(iteratedDerivWithin (n + 1) f (Set.Ioo a b) xi / (Nat.factorial (n + 1) : ℝ)) := 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 natural number , a function , reals , and a family of reals, the hypotheses are:
- is strictly increasing, hence the nodes are pairwise distinct;
- every node lies in the open interval ;
- is continuously differentiable of order on ;
- the point lies in ;
- is different from every node.
The conclusion asserts the existence of a real such that
where denotes the -st iterated derivative of computed relative to the set , which for this open set coincides with the ordinary iterated derivative, and is the factorial cast into .
The point is only asserted to lie in : no relation to the position of among the nodes is claimed, and no uniqueness. The interpolated values are the values of at the nodes.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.