Overshoot at this N: 9.12% (relative to jump width 2A, sample estimate). Increasing N does not remove the oscillation near the jump.
03 Look inside the wave
Same phase, same coefficients
0.0000 + 0.0000 = 0.0000
Remaining includes DC and all components other than the selected order.
Height of the circle's endpoint = composite value. The circle and waveform use separate auto-scaling.
Harmonic amplitude spectrum
√(aₙ² + bₙ²)
Horizontal axis is order n (how many times the fundamental frequency). DC is a separate mean component.
View coefficients and current values in a table
Component
aₙ
bₙ
Current value
Try under the same conditions
The example resets to A=1, multiplier=1, phase=0 and pauses.
What a Fourier series is · Parameter meanings
A periodic shape is expressed as the sum of a basic wave and sine/cosine waves at integer multiples of its frequency. This tool is a model for reading sound and vibration waveforms by which components they contain and how much.
Maximum harmonic order N: 1–50
Upper limit of included frequencies. This is not the number of nonzero components. For a square wave at N=10, the 5 components of orders 1, 3, 5, 7, and 9 are used. Changing N=1 to 2 does not change the shape.
Amplitude A: 0.5–2.0
This is the magnitude of the target waveform. Coefficients, composite values, and RMS error are proportional to A. The composite wave's peak may exceed A. No physical unit is specified for amplitude.
Playback speed: 0.1–3.0×
Changes only the displayed time progression. At 1×, the normalized phase advances 0.09 periods per second. This is not a field for setting a physical frequency in Hz.
Phase t/T: 0–1
Which position in one period to read. Change it by dragging the waveform horizontally, with the arrow keys, or with the phase slider. Direct interaction pauses. Vertical drag scrolls the page.
DC
Mean value a₀/2. For the half-wave rectified sine it is A/π; for the other 3 waveforms it is 0. It is included once in the sum.
Original calculator and graphs
Waveform, N, amplitude, and playback multiplier are linked to the main screen. The share URL does not save the displayed phase.
Parameters
Waveform type
Highest harmonic index N
Amplitude A
Playback multiplier (dimensionless)
Gibbs: ~9.0% overshoot
Results
Harmonics N
10
Peak Value
—
RMS Error
—
Waveform Synthesis (Real-time Animation)
Each circle is a harmonic. The orange endpoint’s vertical coordinate is the sum. Drag the waveform horizontally or use Left/Right arrows to scrub phase; vertical gestures scroll. The two diagrams use separate automatic scales. Shared URLs restore waveform, N, amplitude and playback multiplier; they do not save the current animated phase.
Harmonic amplitudes & DC
Spectrum
The spectrum renderer is unavailable. The waveform and numerical results still work.
Choose waveform, highest harmonic index N and amplitude A. N is the highest retained frequency index, not the number of nonzero terms. A square wave at N=10 uses five components: 1, 3, 5, 7 and 9. The period is normalized to T=1; the axes do not report measured seconds or Hz.
Add the vertical components of the rotating vectors to obtain the synthesized waveform. DC is the mean and is added once. The orange endpoint and the left edge of the waveform refer to the same phase t/T. Each diagram uses its own automatic scale: compare numerical values, not lengths across the two views. Horizontal drag or Left/Right arrows scrub phase and pause playback; vertical gestures scroll the page. Playback speed is a dimensionless display multiplier.
Controls span N=1–50, A=0.5–2.0 and playback multiplier=0.1–3.0. Example buttons set A=1, multiplier=1 and phase=0, then pause.
Worked checks
For a square wave with A=1 and N=1, f₁(t)=4sin(2πt)/π. At t/T=0.25 the sum is 4/π≈1.27324; the full-period RMS error is √(1−8/π²)≈0.43524. N=2 gives the same result because the second harmonic is zero.
For a half-wave rectified sine with A=2 and N=1, DC=2/π≈0.63662 and the first sine amplitude is 1. At t/T=0.25 the sum is 1+2/π≈1.63662 and RMS error is √(0.5−4/π²)≈0.30776. Compare the vector endpoint, numerical sum, DC bar and first-harmonic bar under the same settings.
Each button sets A=1, speed=1 and phase=0, then pauses the example.
Square: fundamental amplitude 4/π ≈ 1.27324; third harmonic 4/(3π) ≈ 0.42441. RMS error is 0.4352 at N=1 and 0.1248 at N=25. Gibbs overshoot asymptotically remains about 9% of the jump 2A; its spatial extent shrinks as N increases.
Triangle: fundamental amplitude 8/π² ≈ 0.81057. RMS error at N=10 is 0.0073. Compare the faster 1/n² decay of the coefficients of this continuous waveform.
Half-wave sine: DC=1/π ≈ 0.31831, fundamental amplitude 1/2, second harmonic amplitude 2/(3π) ≈ 0.21221. RMS error at N=10 is 0.0050. DC is the mean value, not the first harmonic.
Model and limits
Square and sawtooth discontinuities produce Gibbs oscillations. The displayed finite-N overshoot is measured from the computed peak and divided by the jump 2A. About 8.949% is the asymptotic limit as N grows, not a percentage of A. Continuous triangle waves still have finite-N error; a corner differs from a jump in value.
The formulas below define the coefficients and partial sum. Rotating vectors illustrate a real Fourier series; they are not physical particle trajectories or a DFT of an arbitrary drawing. The spectrum shows magnitudes √(aₙ²+bₙ²), without separate sign or phase; DC is |a₀/2|. The peak is estimated on 4096 samples, while RMS uses Parseval. Both diagrams autoscale with amplitude, so also check numerical results.
Square: $b_n = \tfrac{4A}{n\pi}$ (odd $n$ only)
Triangle: $b_n = \tfrac{8A}{n^2\pi^2}\sin\!\tfrac{n\pi}{2}$
Sawtooth: $b_n = -\tfrac{2A}{n\pi}(-1)^n$
Half-wave sine: $a_0/2=A/\pi$, $b_1=A/2$, $a_n=-2A/[\pi(n^2-1)]$ (even $n\ge2$). All other coefficients are zero.
The period is normalized to 1. N is the highest retained harmonic, not the number of nonzero terms. The rising sawtooth starts at 0 and jumps from +A to −A halfway through the period; jump points use the average of the two limits. RMS error is the full-period integral evaluated by Parseval’s relation. Peak amplitude is a 4096-point numerical estimate. Finite-N overshoot is measured relative to the jump size 2A. The spectrum shows √(aₙ²+bₙ²), with DC = a₀/2 separately.
This sawtooth jumps from +A to −A at half a period, with the midpoint value at a jump. The tool does not perform measured FFT, denoising, circuit bandwidth or hardware compliance analysis. Use it to understand periodic components in vibration, acoustics or heat models; check actual units and measurement conditions separately.
N is the highest retained harmonic. Increasing it reduces full-period RMS error. Near square and sawtooth jumps, overshoot approaches about 9% of the jump size 2A while its spatial extent shrinks. The triangle wave is continuous and has no Gibbs overshoot caused by a jump in its value.
The horizontal axis is harmonic order n, not Hz. Each bar shows the combined sine/cosine amplitude √(aₙ²+bₙ²). DC separately shows the absolute mean a₀/2. Square-wave harmonics are odd only, with amplitude proportional to 1/n. This is not power or a measured FFT.
Approximating a periodic jump with finitely many smooth components leaves oscillations near it. At the jump itself, the series converges to the mean of its one-sided limits. The approximately 9% limit is relative to jump size 2A, not amplitude A, and is distinct from the measured overshoot at finite N.
This normalized model teaches how truncation changes the waveform, error and spectrum. Example buttons reproduce exact conditions; pause to compare them. It does not analyze measured FFT data or evaluate real circuit filter performance, bandwidth or standards compliance.