Remix.run Logo
▲ bmacho an hour ago

> First, of course, was a smile of recognition. Then came a “wait a minute” as you realized that the Gibbs phenomenon doesn’t get smaller as you add more terms to the Fourier expansion;

Actually, it gets. Gibbs phenomenon is an artifact of a very specific algorithm on very specific inputs. It doesn't say nothing on "approximation of square waves with sine waves" in general, and arguably, it doesn't appear meaningfully in any types of approximation.

You can approximate a square wave with sine waves with arbitrary precision in most approximations (L1, L2, pointwise etc). What you can't do is to have the largest error less than half the jump at discontiunity, but it is because sum of sine waves is continuous. There is no overshoot or Gibbs of any sort.