One-step Taylor identity behind Euler's method
ProvedMetodosNumericos.euler_local_errorIf solves on and is twice continuously differentiable there, then there is with
which exhibits the local error of one Euler step as .
import Mathlib
namespace MetodosNumericos
theorem euler_local_error (f : ℝ → ℝ → ℝ) (phi : ℝ → ℝ) (x h : ℝ) (hh : 0 < h)
(hsol : ∀ t ∈ Set.Icc x (x + h), HasDerivAt phi (f t (phi t)) t)
(hphi2 : ContDiffOn ℝ 2 phi (Set.Icc x (x + h))) :
∃ mu ∈ Set.Ioo x (x + h),
phi (x + h) =
phi x + h * f x (phi x) + h ^ 2 / 2 * iteratedDerivWithin 2 phi (Set.Icc x (x + h)) mu := 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 , with , the hypotheses are:
- for every , has derivative at ;
- is continuously differentiable of order on .
The conclusion asserts the existence of in the open interval with
where is the second iterated derivative of computed relative to the closed interval . No initial condition is imposed and the value appears through the differential equation at the left endpoint. The point is asserted to exist, without uniqueness.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.