Documentation

Interval.EulerMaclaurin.EulerMaclaurin

Euler-Maclaurin formula #

This lets us approximate finite sums of C^k functions with integrals, with known bounds on the remainder.

Euler-Maclaurin for a single [a, a + 1] interval #

theorem EulerMaclaurin.intervalIntegrable_presaw_smul {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {t : Set } {c : } {n : } (fc : ContDiffOn (↑n) f t) {a b : } (ab : a b) (u : UniqueDiffOn t) (abt : Set.Icc a b t) {s : } :
theorem EulerMaclaurin.integral_saw_eq_integral_presaw {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {t : Set } {a : } {s : } :
(x : ) in a..a + 1, saw s x iteratedDerivWithin s f t x = (x : ) in a..a + 1, presaw s a x iteratedDerivWithin s f t x
theorem EulerMaclaurin.presaw_smul_iteratedDeriv_by_parts {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {t : Set } {a c : } {s : } [CompleteSpace E] (fc : ContDiffOn (s + 1) f t) (u : UniqueDiffOn t) (abt : Set.Icc (↑a) (a + 1) t) :
(x : ) in a..a + 1, presaw s c x iteratedDerivWithin s f t x = presaw (s + 1) c (a + 1) iteratedDerivWithin s f t (a + 1) - presaw (s + 1) c a iteratedDerivWithin s f t a - (x : ) in a..a + 1, presaw (s + 1) c x iteratedDerivWithin (s + 1) f t x

The key integration by parts identity, presaw version

theorem EulerMaclaurin.presaw_iterated_by_parts {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {t : Set } {a : } {s : } [CompleteSpace E] (fc : ContDiffOn (s + 1) f t) (u : UniqueDiffOn t) (abt : Set.Icc (↑a) (a + 1) t) :
(x : ) in a..a + 1, f x = 2⁻¹ (f a + f (a + 1)) - mFinset.range s, (-1) ^ m saw (m + 2) 0 (iteratedDerivWithin (m + 1) f t (a + 1) - iteratedDerivWithin (m + 1) f t a) - (-1) ^ s (x : ) in a..a + 1, presaw (s + 1) a x iteratedDerivWithin (s + 1) f t x

Iterated integration by parts, presaw version

The full Euler-Maclaurin formula #

def trapezoid_sum {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] (f : E) (a : ) :
E

Trapezoidal sum: the trapezoidal rule for integer step size on [a, a + n]

Equations
Instances For
    @[simp]
    theorem trapezoid_sum_zero {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {a : } :
    theorem trapezoid_sum_succ {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {a : } {n : } :
    trapezoid_sum f a (n + 1) = trapezoid_sum f a n + 2⁻¹ (f (a + n) + f (a + n + 1))
    theorem ae_ne {α : Type u_2} [MeasurableSpace α] (μ : MeasureTheory.Measure α) [MeasureTheory.NoAtoms μ] (x : α) :
    ∀ᵐ (y : α) μ, y x
    theorem intervalIntegrable_saw_smul {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {t : Set } {a : } {s n : } (fc : ContDiffOn (↑s) f t) (u : UniqueDiffOn t) (abt : Set.Icc (↑a) (a + n) t) :
    IntervalIntegrable (fun (x : ) => saw s x iteratedDerivWithin s f t x) MeasureTheory.volume (↑a) (a + n)
    theorem trapezoid_sum_eq_integral_add {E : Type u_1} [NormedAddCommGroup E] [NormedSpace E] {f : E} {t : Set } {a : } {s n : } [CompleteSpace E] (fc : ContDiffOn (s + 1) f t) (u : UniqueDiffOn t) (abt : Set.Icc (↑a) (a + n) t) :
    trapezoid_sum f a n = ( (x : ) in a..a + n, f x) + mFinset.range s, (-1) ^ m saw (m + 2) 0 (iteratedDerivWithin (m + 1) f t (a + n) - iteratedDerivWithin (m + 1) f t a) + (-1) ^ s (x : ) in a..a + n, saw (s + 1) x iteratedDerivWithin (s + 1) f t x

    The Euler-Maclaurin formula