Compute Fourier coefficients a₀, aₙ, bₙ and reconstruct periodic functions. Visualize the original function and its Fourier partial sum up to N harmonics. Perfect for engineers, mathematicians, and students.
Fourier series decompose periodic functions into infinite sums of sines and cosines. For a function f(x) with period 2L, the Fourier expansion is:
f(x) = a₀/2 + Σₙ₌₁^∞ [ aₙ cos(nπx/L) + bₙ sin(nπx/L) ]
where a₀ = (1/L)∫₋ᴸᴸ f(x) dx, aₙ = (1/L)∫₋ᴸᴸ f(x) cos(nπx/L) dx, bₙ = (1/L)∫₋ᴸᴸ f(x) sin(nπx/L) dx
This powerful concept bridges the time domain with frequency domain, making it essential in acoustics, electrical engineering, quantum mechanics, and data compression. Our calculator evaluates these integrals numerically using adaptive Simpson‑like quadrature, giving you accurate coefficients for custom functions.
Named after Joseph Fourier (1768–1830), his groundbreaking work "The Analytical Theory of Heat" introduced series expansion to solve partial differential equations. Initially controversial, it later became the foundation of harmonic analysis. The orthogonality of trigonometric functions guarantees uniqueness of coefficients, and the convergence (pointwise, uniform, or L²) depends on function regularity. Fourier series also enable the famous Fast Fourier Transform (FFT), revolutionizing digital signal processing.
Our calculator uses composite Simpson’s rule with 2048 points per integral to achieve high accuracy. For well‑behaved functions, coefficient errors are below 1e-5. For functions with steep gradients, the error remains minimal. Each integration is performed independently; results are robust for up to N = 25 harmonics.