An unofficial, read-only Hacker News reader.

XKCD and Fourier (opens external site)

104 points by surprisetalk 5 days ago | leancrew.com | 40 comments on HN

View full thread · View on Hacker News

Comment thread (2)

  1. > 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.

    Replies (1)
    1. No it doesn't, since the quote is precisely about Fourier series.

      But you make a great point: the original comic doesn't mention Fourier (only the blog post does) so the comic is not wrong in not showing Gibbs oscillations at the end!