Calculus
Lab: building a Fourier series
Add harmonics, read coefficients and compare with the periodic function. Explore Gibbs and Fejér means without confusing mean and uniform errors.
Model and coefficients
One second per added harmonic: N is the highest harmonic index, not the number of nonzero coefficients. u=t₀/T stays fixed; u=0.25 means t₀=T/4. Zoom affects only the first plot.
Periodic function and reconstruction
Point t₀ lies outside the zoom; its values remain listed below.
Values and errors: what they measure
The blue dot marks Sₙ(t₀); for the square wave the red dot marks the first peak to the right of the jump.
Fejér avoids overshoot outside the value range of bounded signals, but does not make convergence to a jumping function uniform. At the same N, Sₙ is the best quadratic approximation: σₙ may have larger RMS.
A single harmonic
Amplitude spectrum
For n≥1 bars show √(aₙ²+bₙ²); at n=0, |a₀/2|. Purple bars apply Fejér weights 1−n/(N+1). Phase convention: aₙcos+bₙsin=Rₙcos(nω₀t−φₙ).
Value table
φₙ in radians; — means zero amplitude and undefined phase. n/T is in cycles per t unit. Table coefficients are analytical, not estimated from the plot.
Coefficient formulas and Parseval concern mathematical functions. Values and plots use floating point; a grid maximum is not the uniform error. At jumps we draw one-sided values and their midpoint without a continuous connecting line. No DFT coefficient estimation or audio generation.