Global error of Euler's method is
ProvedMetodosNumericos.euler_global_errorLet solve , on , be twice continuously differentiable there, and let be Lipschitz in with constant for . Then there is such that for every step and every index with , the Euler iterate satisfies . This is the source's statement that the global error of Euler's method is .
import Mathlib import Definitions.Def_MetodosNumericos_edoDefs
namespace MetodosNumericos
theorem euler_global_error (f : ℝ → ℝ → ℝ) (phi : ℝ → ℝ) (x0 y0 X L : ℝ) (hX : x0 < X)
(hphi0 : phi x0 = y0)
(hsol : ∀ x ∈ Set.Icc x0 X, HasDerivAt phi (f x (phi x)) x)
(hphi2 : ContDiffOn ℝ 2 phi (Set.Icc x0 X))
(hlip : ∀ x ∈ Set.Icc x0 X, ∀ u v : ℝ, |f x u - f x v| ≤ L * |u - v|) :
∃ C > 0, ∀ h ∈ Set.Ioc (0 : ℝ) 1, ∀ i : ℕ, x0 + i * h ≤ X →
|eulerSeq f x0 y0 h i - phi (x0 + i * h)| ≤ C * h := 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 of two real variables, a function of one real variable and reals , , , , the hypotheses are:
- ;
- ;
- for every , has derivative at ;
- is continuously differentiable of order on ;
- for every and all real (not only those near the solution), .
The conclusion asserts the existence of a real such that for every with and every natural number with ,
where is the Euler iterate with step : as given and .
The constant is uniform in both and and is asserted to exist rather than being exhibited. The grid points used by the iteration up to index all lie in because and . The bound is linear in , which is the meaning of "global error of order one".
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.