Model waveforms and custom piecewise signals with precision. Track coefficients, errors, approximations, and harmonic energy. See every term reshape the curve across each cycle.
General Fourier series
f(x) = a0/2 + Σ [an cos(nπx/L) + bn sin(nπx/L)]
Here, the half-period is L = T/2 and the period is T.
Coefficient formulas
a0 = (1/L) ∫-LL f(x) dx
an = (1/L) ∫-LL f(x) cos(nπx/L) dx
bn = (1/L) ∫-LL f(x) sin(nπx/L) dx
This solver evaluates the integrals numerically with midpoint integration. That makes it useful for classic waveforms and custom piecewise signals when symbolic integration is unavailable.
| Example | Function Type | Amplitude | Period | Terms | Notes |
|---|---|---|---|---|---|
| 1 | Square Wave | 1 | 2π | 12 | Strong odd harmonics and visible Gibbs overshoot. |
| 2 | Triangle Wave | 1.5 | 2π | 15 | Smoother curve and faster coefficient decay. |
| 3 | Sawtooth Wave | 2 | 4 | 18 | Contains all harmonics with slower decay. |
| 4 | Custom Piecewise | Use points | 6.2832 | 20 | Model measured or designed periodic profiles. |
It computes numerical Fourier coefficients, the truncated series, sampled approximations, error statistics, symmetry hints, and harmonic magnitude plots for periodic signals.
The calculator uses numerical integration, so values that should be zero analytically may appear as very small floating-point remnants.
That is the Gibbs phenomenon. Partial sums oscillate near discontinuities, even when more terms are added. The oscillation narrows, but the peak does not vanish completely.
Yes. Enter piecewise points across one full period. The calculator linearly interpolates between them and then repeats the shape periodically.
Start with 10 to 20 terms. Smooth signals usually converge quickly. Signals with sharp corners or jumps often need more terms for better accuracy.
It is the summed squared magnitude of the non-constant harmonic coefficients in the chosen truncation. It helps compare how strongly the waveform spreads across harmonics.
Even symmetry suppresses sine terms, while odd symmetry suppresses cosine terms and the constant term. Recognizing symmetry simplifies interpretation and debugging.
They include the summary metrics and the full coefficient table, making it easier to archive runs, compare settings, or share results.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.