Target f(x) Partial sum S_N(x) Individual harmonics

Functional Analysis: Fourier Basis Projection

Functional analysis studies infinite-dimensional vector spaces of functions — this simulator makes one concrete: the space L²(0,π) with orthonormal basis {sin(nx)}. A chosen target function is projected onto that basis by computing its inner-product coefficients bₙ, and the truncated sum of the first N basis vectors is drawn live against the original. Watch the reconstruction sharpen as N grows, track the L² approximation error and the fraction of the function's total energy captured by the basis, and toggle the individual harmonics to see which frequencies matter most.