The overshoot that refuses to leave.
Stack enough odd-numbered sine waves and their sum turns into a square wave — almost. Right at each edge a little "ear" pokes past the flat top, and no matter how many terms you add, it never shrinks below about 9% of the jump.
f(t)
=
4π
N
Σ
k=1,3,5…
sin(kωt)k
Terms N
harmonics 1…1
1 termeach step adds the next odd harmonic99 terms
Overshoot at the edge
% of jump
Try
This is a Fourier series — the idea, from Joseph Fourier, that almost any repeating wave can be built by adding up sine waves of the right frequencies and sizes. Here only the odd harmonics of a square wave are used, each weighted 1/k, which is the classic textbook case. The stubborn overshoot at every jump is the Gibbs phenomenon: as more terms are added the overshoot squeezes closer to the edge and gets narrower, but its height converges to a fixed ≈8.95% of the jump size (numerically confirmed here up to 500 terms, matching the textbook constant (2/π)∫₀π sin(x)/x dx − 1 ≈ 0.0895) and never disappears. It's the same reason digital audio and video systems apply anti-aliasing and smoothing around sharp edges: any hard discontinuity reconstructed from a finite set of frequencies rings, and that ringing traces straight back to this fact.