The Fourier series of
ProvedFourierSeries.hasSum_absCos_harmonicsThe Fourier expansion of the rectified cosine.
The function is even and -periodic, so its Fourier series contains only the cosines of even multiples of . The expansion converges pointwise everywhere to
Equivalently, reindexing by , the series
converges to .
The constant term is the mean value of over a period, and the coefficients decay like , which is why the series converges absolutely and uniformly — the rectified cosine is continuous, with a corner rather than a jump at each zero of . The denominators arise from .
This expansion is the standard worked example of a Fourier series for a continuous but non-smooth periodic function, and it appears as a technical tool wherever or must be replaced by a trigonometric series — for instance in estimating mean values of along vertical lines, or in bounding absolute values of exponential sums.
Formalization note. The statement is given as a HasSum over , which
asserts unconditional convergence of the family to the stated value, rather than convergence
of a particular sequence of partial sums.
import Mathlib
namespace FourierSeries
theorem hasSum_absCos_harmonics (θ : ℝ) :
HasSum (fun m : ℕ => 4 / Real.pi
* ((-1 : ℝ) ^ m * Real.cos (2 * ((m : ℝ) + 1) * θ) / (4 * ((m : ℝ) + 1) ^ 2 - 1)))
(|Real.cos θ| - 2 / Real.pi) := by sorry
end FourierSeries