An explicit truncation error for the Fourier series of
ProvedFourierSeries.abs_cos_partial_fourier_boundA uniform error bound for truncating the Fourier series of the rectified cosine.
Recall the expansion . Truncating after terms, the remainder is bounded uniformly in by
The rate is what the alternating structure buys: bounding the tail term by term would give as well, and the partial-fraction identity makes the tail telescope to exactly .
Having an explicit, -uniform truncation error is what makes the expansion usable as a tool rather than an identity: one replaces by a trigonometric polynomial of controlled degree and pays a known price, which is the standard manoeuvre when or must be integrated against another oscillating factor.
Formalization note. The sum runs over Finset.Icc 1 Mcut, i.e. ; the bound
holds for every real and every .
import Mathlib
namespace FourierSeries
theorem abs_cos_partial_fourier_bound (θ : ℝ) (Mcut : ℕ) :
|(|Real.cos θ| - 2 / Real.pi - 4 / Real.pi * ∑ m ∈ Finset.Icc 1 Mcut,
(-1 : ℝ) ^ (m + 1) * Real.cos (2 * (m : ℝ) * θ) / (4 * (m : ℝ) ^ 2 - 1))|
≤ 2 / (Real.pi * (2 * (Mcut : ℝ) + 1)) := by sorry
end FourierSeries