Documentation

Interval.Misc.TrigBounds

Bounds for sin and cos #

Monotonicity of sin on intervals #

theorem Real.sin_monotone (n : ) :
MonotoneOn sin (Set.Icc (n * (2 * Real.pi) - Real.pi / 2) (n * (2 * Real.pi) + Real.pi / 2))

All the intervals on which sin is increasing

theorem Real.sin_antitone (n : ) :
AntitoneOn sin (Set.Icc (n * (2 * Real.pi) + Real.pi / 2) (n * (2 * Real.pi) + 3 * Real.pi / 2))

All the intervals on which sin is decreasing

Taylor series with remainder for sin and cos #

theorem Finset.sum_range_even {M : Type u_1} [AddCommMonoid M] (n : ) (f : M) :
krange n, f k = krange (2 * n), if Even k then f (k / 2) else 0

Double the range of a Finset.sum

theorem Complex.sin_series_bound {z : } (z1 : z 1) (n : ) :
sin z - z * kFinset.range n, (-1) ^ k * z ^ (2 * k) / (2 * k + 1).factorial z ^ (2 * n + 1) * ((2 * n + 2) / ((2 * n + 1).factorial * (2 * n + 1)))
theorem Complex.cos_series_bound {z : } (z1 : z 1) {n : } (n0 : 0 < n) :
cos z - kFinset.range n, (-1) ^ k * z ^ (2 * k) / (2 * k).factorial z ^ (2 * n) * ((2 * n + 1) / ((2 * n).factorial * (2 * n)))
theorem Real.sin_series_bound {x : } (x1 : |x| 1) (n : ) :
|sin x - x * kFinset.range n, (-1) ^ k * x ^ (2 * k) / (2 * k + 1).factorial| |x| ^ (2 * n + 1) * ((2 * n + 2) / ((2 * n + 1).factorial * (2 * n + 1)))
theorem Real.cos_series_bound {x : } (x1 : |x| 1) {n : } (n0 : 0 < n) :
|cos x - kFinset.range n, (-1) ^ k * x ^ (2 * k) / (2 * k).factorial| |x| ^ (2 * n) * ((2 * n + 1) / ((2 * n).factorial * (2 * n)))

Real.sinc and Complex.sinc #

noncomputable def Complex.sinc (z : ) :
Equations
Instances For
    theorem Real.sin_eq_sinc (x : ) :
    sin x = x * sinc x

    sinc suffices to compute sin

    theorem Complex.sin_eq_sinc (z : ) :
    sin z = z * z.sinc

    sinc suffices to compute sin

    @[simp]
    theorem Complex.sinc_neg (x : ) :
    (-x).sinc = (↑x).sinc
    @[simp]
    theorem Real.sinc_abs (x : ) :

    sinc is even

    @[simp]
    theorem Complex.ofReal_sinc (x : ) :
    (Real.sinc x) = (↑x).sinc

    Taylor series with remainder for sinc #

    theorem Complex.sinc_series_bound {z : } (z1 : z 1) (n : ) :
    z.sinc - kFinset.range n, (-1) ^ k * z ^ (2 * k) / (2 * k + 1).factorial z ^ (2 * n) * ((2 * n + 2) / ((2 * n + 1).factorial * (2 * n + 1)))
    theorem Real.sinc_series_bound {x : } (x1 : |x| 1) (n : ) :
    |sinc x - kFinset.range n, (-1) ^ k * x ^ (2 * k) / (2 * k + 1).factorial| |x| ^ (2 * n) * ((2 * n + 2) / ((2 * n + 1).factorial * (2 * n + 1)))

    Auxiliary functions with cleaner power series #

    noncomputable def sinc_sqrt (x : ) :
    Equations
    Instances For
      noncomputable def cos_sqrt (x : ) :
      Equations
      Instances For
        theorem Real.sinc_eq_sinc_sqrt (x : ) :

        sinc_sqrt suffices to compute sinc

        theorem Real.sin_eq_sinc_sqrt (x : ) :
        sin x = x * sinc_sqrt (|x| ^ 2)

        sinc_sqrt suffices to compute sin

        theorem cos_eq_cos_sqrt (x : ) :

        cos_sqrt suffices to compute cos