XKCD and Fourier

(leancrew.com)

75 points | by surprisetalk 2 days ago ago

25 comments

  • bmacho 17 minutes 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. It doesn't say nothing on "approximation" 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.

  • nukanse 35 minutes ago

    Sin cos are exponentials. There is a shorter way to create a square wave function: take a tiny base 0<b<1, and any initial function 0<f(x)<1 Iterate b^f(x), and it produce a square wave with smooth corners

  • TeMPOraL 2 hours ago

    If you've ever used an oscilloscope to look at a square wave in electronics, or did any audio synthesis, you look at the ending of the post and raise an eyebrow (in the way Spock does it), and note that yes, this is what square waves are in real life. The corner wobble is normal.

    • mytailorisrich 40 minutes ago

      Yes, because as per Fourier decomposition of square waves, a "perfect" corner requires infinite bandwidth.

  • tristanj 5 hours ago

    In order for this to work, you'd need to know the direction of the observer you're targeting, since the relative phases/amplitudes of gravitational waves would only cancel out in some directions and not others.

    • grogenaut 4 hours ago

      the comic says you are targeting earth in the alt text and I think it can be safely assumed that earth is the target just as HN is US centric

      • bartvk 3 hours ago

        For some reason, this is quite funny

        • grogenaut 2 hours ago

          I find most XKCDs quite funny, happy thanks giving all of HN

  • josselex 3 hours ago

    If you low pass filter, which any detector will do, it should go away.

    • schiffern 2 hours ago

      Good news is, LIGO is only sensitive below 10 kHz, which naturally limits the number of expansion terms (neutron stars / black holes) you need!

    • empiricus 2 hours ago

      "if you low pass filter" is this not equivalent to using a different sum of freqs at the source?

  • arbasli2 3 hours ago

    but still the joke is very funny and not too far from correct.

  • pyrale an hour ago

    related xkcd: https://xkcd.com/356/

    • Incipient 36 minutes ago

      Fun Friday afternoon for lawyers to debate! Could you get someone on murder for this?

  • amelius an hour ago

    You will surprise more than just a bunch of astronomers if you manage to move black holes like that.

  • mrheosuper 4 hours ago

    You just need to add more black holes, ideally infinite.

    • wolvoleo 4 hours ago

      That's what she said

  • normalperverts 4 hours ago

    Alternatively, you can just mess with the measuring device's precision until the corners are imperceptible.

    But if that's still hard, then we can still achieve it with sufficient, or perhpas too much, alchool. Just avoid a particular amount of blood alchool, the scientist will instantly call your black holes out.

  • seanhunter 4 hours ago

    As they say “Explaining a joke is like dissecting a frog: you may learn a lot but something dies.”

    • yreg an hour ago

      This never made sense to me. When I understand the joke, the explanation is meaningless to me. But it doesn't detract from my experience.

      When I don't understand the joke, the explanation does often make me find it funny.

      Like sure, it is obnoxious to have a joke I understand have explained specifically to me, the same as having anything I understand have explained to me and only me. But that's not what happens in blog posts and online threads (usually).

    • jmward01 4 hours ago

      But the next day, when you take the frog out of the fridge, you give a little jump as its heart starts again! Exactly like a good joke!

    • throw310822 2 hours ago

      Let's dissect this frog- can you explain why this is funny?

  • cobychapple 4 hours ago

    if you can arrange infinitely many black hole binaries at odd harmonic frequencies, a 9% overshoot at the corners feels like an acceptable tolerance.

    bonus: also related very early xkcd https://xkcd.com/26/

  • stuaxo an hour ago

    Eh, looks square wave enough for me