THE GARDEN
Updated 01 Oct 2026
represents a periodic function using a constant term and sinusoidal harmonics
with period TT and ω0=2π/T\omega_0=2\pi/T, f(t)∼a0/2+∑k=1∞[akcos(kω0t)+bksin(kω0t)]f(t)\sim a_0/2+\sum_{k=1}^{\infty}[a_k\cos(k\omega_0t)+b_k\sin(k\omega_0t)].
ak=(2/T)∫t0t0+Tf(t)cos(kω0t),dta_k=(2/T)\int_{t_0}^{t_0+T}f(t)\cos(k\omega_0t),dt.
bk=(2/T)∫t0t0+Tf(t)sin(kω0t),dtb_k=(2/T)\int_{t_0}^{t_0+T}f(t)\sin(k\omega_0t),dt.
some materials put the mean directly in a constant called a0a_0. Keep the coefficient convention consistent.
a zero-mean square wave taking values ±1\pm1 has sine coefficients bk=4/(πk)b_k=4/(\pi k) for odd kk, and zero for even kk, with the corresponding phase/origin choice.
“Maximum harmonic NN” and “number of included nonzero terms” are different quantities.
approximate the integrals using a stated quadrature rule and sufficient sampling resolution.
a uniform grid over one period should not accidentally double-count the same periodic endpoint.
general harmonic amplitude is ak2+bk2\sqrt{a_k^2+b_k^2}; ∣bk∣|b_k| alone applies to a purely sine representation.
Gibbs Phenomenon
Root Mean Square Error
◌ Explore connections in Graph view
Paths through the garden