Documentation

CslibFrontier.Foundations.Analysis.SpecialFunctions.Trigonometric.Bounds

Degree-ten Taylor bounds and tangent lines for sin and cos #

Mathlib's Real.cos_bound and Real.sin_bound approximate cos x and sin x on [-1, 1] by their Taylor polynomials of degree 2 and 3, with errors of order x ^ 4 and x ^ 5. Some numerical constants need more precision: the Goemans–Williamson constant, for instance, is determined by a tangent line whose margin is about 10⁻⁵. This module gives the Taylor polynomials of degree 8 and 9, both with error at most |x| ^ 10 * (11 / 36288000) (about 3 · 10⁻⁷ at |x| = 1), from Mathlib's Complex.exp_bound at x * I with ten terms. It also states the tangent-line bound of the concave function cos on [-π/2, π/2].

Main results #

theorem Real.cos_bound_ten {x : ℝ} (hx : |x| ≤ 1) :
|cos x - (1 - x ^ 2 / 2 + x ^ 4 / 24 - x ^ 6 / 720 + x ^ 8 / 40320)| ≤ |x| ^ 10 * (11 / 36288000)

Degree-eight Taylor bound for cos on [-1, 1], with the error term of ten terms of the exponential series.

theorem Real.sin_bound_ten {x : ℝ} (hx : |x| ≤ 1) :
|sin x - (x - x ^ 3 / 6 + x ^ 5 / 120 - x ^ 7 / 5040 + x ^ 9 / 362880)| ≤ |x| ^ 10 * (11 / 36288000)

Degree-nine Taylor bound for sin on [-1, 1], with the error term of ten terms of the exponential series.

theorem Real.cos_le_cos_sub_sin_mul {x x₀ : ℝ} (hx : x ∈ Set.Icc (-(Real.pi / 2)) (Real.pi / 2)) (hx₀ : x₀ ∈ Set.Icc (-(Real.pi / 2)) (Real.pi / 2)) :
cos x ≤ cos x₀ - sin x₀ * (x - x₀)

Tangent lines of cos. On [-π/2, π/2], where cos is concave, cos lies below its tangent line at any point x₀ of the interval.