Skip to content
All apps

Fourier Synthesis

About this app

11 free coefficients (a₀/2 + a₁..a₅ + b₁..b₅) — ghost curves per term, live sum and spectrum, build any periodic function by hand.

The idea

Fourier synthesis is the reverse of Fourier analysis: a periodic function is built from sine and cosine waves. A finite Fourier series reads f(x) = a₀/2 + ∑ₖ [aₖ·cos(kx) + bₖ·sin(kx)]. The constant term a₀/2 shifts the curve up or down, and aₖ and bₖ set how strongly the k-th harmonic contributes. All frequencies are integer multiples of the fundamental, so the sum is again 2π-periodic. Just a few terms are enough to approximate square, sawtooth or triangle waves recognisably.

What the app shows

Eleven sliders control a₀/2, the cosine parts a₁ to a₅ and the sine parts b₁ to b₅. The main curve shows the sum, and thin ghost curves show each single term aₖ·cos(kx) and bₖ·sin(kx). Presets load the coefficients for square, sawtooth, triangle and a narrow pulse; “Reset” sets everything to zero. The formula panel shows the series with the current numbers.

Try it yourself

Load the square preset and look at which sliders are non-zero: only the odd sine parts b₁, b₃, b₅ contribute. Compare with the triangle, which also uses odd sine terms, but with coefficients falling like 1/k², so it looks smoother. Then build your own wave, for example only b₁ and b₂, and watch the ghost curves add up to the sum.

Frequently asked questions

What is Fourier synthesis?
Fourier synthesis builds a periodic function from a sum of sine and cosine waves whose frequencies are integer multiples of a fundamental. The coefficients set the strength of each component. The more terms you use, the closer you can get to a target shape.
What are the Fourier coefficients of a square wave?
An odd square wave with values ±1 and period 2π has only sine terms with odd k: bₖ = 4/(π·k). All aₖ and all bₖ with even k are zero. The coefficients decay like 1/k.
What is the difference between aₖ and bₖ?
aₖ multiplies cos(kx) and bₖ multiplies sin(kx). Even functions have only cosine terms, odd functions only sine terms. General functions need both.
Which presets does the app offer?
Square, sawtooth, triangle and narrow pulse, each built from the first five harmonics. “Reset” starts from zero so you can build your own waveforms.

Subject: Fourier analysis

More from Fourier analysis

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps