Add harmonics one by one to build square, sawtooth and triangle waves from sines and cosines. See the Gibbs phenomenon and listen to how the sound changes as harmonics are added.
Loading the simulation…
How to use
- Choose a wave.
- Increase the number of harmonics.
- Press the sound buttons to hear the difference.
Formula
$f(x) = \dfrac{a_0}{2} + \sum_{n=1}^{\infty}(a_n \cos nx + b_n \sin nx)$
Level: UG (BSc / BE / BCA), PG (MSc / KSET / NET) · Topic: Calculus
Frequently asked questions
What is the Gibbs phenomenon?
The partial sums overshoot near a jump by about 9%, no matter how many terms are added.
Which harmonics make a square wave?
Only the odd ones: sin x, sin 3x/3, sin 5x/5, …
Related tools
CalculusDerivative as slope of tangentSecant lines become the tangent as h → 0.CalculusArea under a curve (Riemann sums)Rectangles and trapeziums approximate a definite integral.CalculusTaylor & Maclaurin seriesPolynomial approximations of sin, cos, eˣ, ln(1+x) term by term.Linear algebraMatrix calculatorExact determinant, inverse, product, sum and transpose up to 5×5.GraphsGraph plotterPlot up to three functions with zoom and coordinate readout.