A Fourier series of my favorite function!

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ย. 2024

ความคิดเห็น • 86

  • @okpgamingdk1093
    @okpgamingdk1093 2 ปีที่แล้ว +135

    A cool result that follows from this is if you substitute in x=1/2*pi then you get the result that the sum of sin(n)/n from 1 to infinity equals (pi-1)/2. It's always fun when doing a Fourier series yields a very non-trivial result. It happens more often than you would think.

    • @bamdadtorabi2924
      @bamdadtorabi2924 2 ปีที่แล้ว +23

      You can also plug in x=0.25 to get the Leibniz formula for pi, namely:
      pi/4 = sum{n=0 -> infinity}(-1)^n/n

    • @megauser8512
      @megauser8512 2 ปีที่แล้ว

      @@bamdadtorabi2924 You mean n=1-> infinity

    • @bamdadtorabi2924
      @bamdadtorabi2924 2 ปีที่แล้ว +8

      @@megauser8512 Nah I made a mistake, its (2n+1) in the denominator. That should make it right

    • @Cashman9111
      @Cashman9111 2 ปีที่แล้ว +12

      it would be nice to have LateX here, wouldn't it ?

  • @theosib
    @theosib 2 ปีที่แล้ว +22

    I've actually done a fourier analysis of the floor function before. It's an approximation, of course, and it was meant to allow backpropagation in a neural net that included floor as an activation function. So basically, I did this because I need a differentiable floor function.

  • @DoktorApe
    @DoktorApe 2 ปีที่แล้ว +32

    Fun applications fact: sawtooth waves are popular in electronic synthesizers because the harmonics have relatively high amplitudes compared to most other easy-to-generate periodic functions, allowing one to vary the timbre a lot with various filters. (Also filters are fun to analyze with Laplace transforms.)

    • @Tarnith
      @Tarnith 2 ปีที่แล้ว +2

      Until you get to discrete synthesizers, and then it becomes the game of band limited approximations of the piecewise discontinuity a straight fractional function would have when constrained to a specific sample rate =) (Otherwise all those high harmonics image back from nyquist, and lose their harmonic relationship)
      (Filters are still fun to analyze, but you end up in Z transforms)

  • @SliversRebuilt
    @SliversRebuilt 2 ปีที่แล้ว +32

    I find the formulas forthcoming in this forceful tour-de-fource of fractional fragments of floor-functional fourier series to be formidably informative and unfathomably, fantastically fun!!
    Fhanks, Dr. Fenn 🤙🏻🤙🏻

    • @evanev7
      @evanev7 2 ปีที่แล้ว +1

      Nice lmao

    • @replicaacliper
      @replicaacliper 2 ปีที่แล้ว +3

      This made me nauseous

  • @xird_3396
    @xird_3396 2 ปีที่แล้ว +8

    We can simply find An=0 by seeing that {x}-1/2 is an odd fonction. Therfore the part with cos is null.

  • @UltraMaXAtAXX
    @UltraMaXAtAXX 2 ปีที่แล้ว +7

    You mean a... floorier series.

  •  2 ปีที่แล้ว +2

    This Fourier series is just one step away from solving the Basel problem. (The series for the {x} function.) Take the integral of the magnitude squared of the function, and of the Fourier series. The result yields the sum of 1/n^2.

  • @bmorling
    @bmorling 2 ปีที่แล้ว +15

    a very nice floorier series!

    • @ongzz
      @ongzz 2 ปีที่แล้ว

      nice pun xD

  • @khalidammari2684
    @khalidammari2684 2 ปีที่แล้ว +21

    Another formula for the floor function that I don't see mentioned very often is: x-1/2+arctan(cot(pi*x))/pi for x not an integer.

    • @davidblauyoutube
      @davidblauyoutube 2 ปีที่แล้ว +3

      I think we need a video where Dr. Penn shows the sum in the answer, converging to your expression!

    • @Mizziri
      @Mizziri 2 ปีที่แล้ว

      That's extremely silly and wonderful.

    • @JM-us3fr
      @JM-us3fr 2 ปีที่แล้ว

      Is that true? Why would that work?

    • @JM-us3fr
      @JM-us3fr 2 ปีที่แล้ว +5

      Nevermind, I solved for it. You have to use the identity cot y=tan(pi/2-y)
      PS: It works because of the restricted codomain of arctan. The fractional part of x naturally pops out.

    • @simonwillover4175
      @simonwillover4175 2 ปีที่แล้ว +1

      Wow! I didn't know.

  • @Hermaniac8
    @Hermaniac8 2 ปีที่แล้ว +2

    5:42
    "next fix men"
    A difficult task indeed

  • @Vladimir_Pavlov
    @Vladimir_Pavlov 2 ปีที่แล้ว +4

    The author should explain to the audience that it is not always possible to associate a function and its Fourier series with an equal sign (which he does at the end of the video) for all x. In this example, this can be done only for the points of continuity of the decomposed function.
    If we take x = m∈Z, then the resulting Fourier series will always give the value 1/2,
    although {m}=0.
    If f(x) has a discontinuity of the 1st kind at point x0, then the value of the Fourier series at this point is
    (1/2)*[lim(x→x0-)f(x)+lim(x→x0+)f(x)].
    P.S. Anyone who has the ability to plot a partial sum of the Fourier series of a function, even when taking into account a large number of terms, can observe the Gibbs phenomenon on the graph.)

    • @shahramkhazaie
      @shahramkhazaie 2 ปีที่แล้ว

      Indeed, a very interesting remark !

  • @Chalisque
    @Chalisque 2 ปีที่แล้ว +4

    The function { x } is known to synth-heads as the sawtooth waveform, beloved of many classic dance tracks.

  • @obilisk1
    @obilisk1 2 ปีที่แล้ว +1

    You should show some of these Fourier transforms using the complex Fourier series too, gives the same results and in my opinion is really convenient and elegant

  • @jamesfortune243
    @jamesfortune243 2 ปีที่แล้ว +1

    Brilliant. Useful too.

  • @jsmdnq
    @jsmdnq 2 ปีที่แล้ว +2

    It might be easier to simply state that the fourier transform of a unit square(rect) is a sinc function and so the floor is sum(k*rect(x - k)) and then use linearity of the fourier transform to get the fourier transform of of the floor which can then be used to reconstruct the sign. This avoids having to re-derive all the transforms.

  • @goodplacetostop2973
    @goodplacetostop2973 2 ปีที่แล้ว +14

    14:59

  • @jobersudyobodou9362
    @jobersudyobodou9362 2 ปีที่แล้ว

    For those of you who have Mathematica:
    floor[x_] := x - 1/2 + 1/Pi Sum[1/n Sin[2 Pi n x], {n, 1, 10}]
    floor[2.3]
    1.98852
    And plot a staircase:
    Plot[floor[x], {x, 1, 10}]

  • @JM-us3fr
    @JM-us3fr 2 ปีที่แล้ว +1

    I computed this literally yesterday, just out of curiosity. What a coincident!

    • @JM-us3fr
      @JM-us3fr 2 ปีที่แล้ว

      Oh also, I believe that series doesn't converge very quickly. Maybe it would help to use an Euler-Maclaurin estimation?

  • @nikitakipriyanov7260
    @nikitakipriyanov7260 2 ปีที่แล้ว +5

    It's easy to find Foirier series for {x}. But there is another addend, x. For the whole video I waited how Michael is going to write that x as a Fourier series. It is disappointing that this most interesting part was ommited :(

    • @scathiebaby
      @scathiebaby 2 ปีที่แล้ว

      Is this even possible ? I think it's not because f(x) = x can get infinitely high, and you can't write this as a sum of periodic functons.

    • @nikitakipriyanov7260
      @nikitakipriyanov7260 2 ปีที่แล้ว +1

      @@scathiebaby that’s the point

  • @davidgillies620
    @davidgillies620 2 ปีที่แล้ว +1

    From a physical standpoint it's helpful to think of the a_0 as the DC bias on the signal.
    It's interesting to drive the input of a spectrum analyser with the output of a signal generator set to produce sawtooth, square, triangular etc. waveforms and see exactly the Fourier coefficients you obtain from doing the analysis (it would be worrying were it otherwise, but the confirmation is nice). You quite often do this in lab work for a physics or elec eng undergraduate degree.

  • @abrahammekonnen
    @abrahammekonnen 2 ปีที่แล้ว

    4:01 I think the reason why we are allowed to exchange the summation and integration is that we just assume that the series converges.

  • @abrahammekonnen
    @abrahammekonnen 2 ปีที่แล้ว

    As usual cool video. Thank you.

  • @kevinmartin7760
    @kevinmartin7760 2 ปีที่แล้ว

    If you take the first derivative of this form, you get a non-converging series:
    d/dx(floor(x)) = 1 + 2 sum{n=1 to infinity}(cos(2*pi*n*x))
    If x is an integer the terms in the series are all 1, and the result is infinite (which makes sense for the jump discontinuity of the floor function at integer values). In all other cases, the terms of the series vary between -1 and 1 but never reach a limit of 0 (or any other limit for that matter) and the sum is undefined.
    On the other hand the derivative should clearly be zero for all non-integer values, so the sum should be -1/2.

    • @ongerek
      @ongerek 2 ปีที่แล้ว

      The derivative is simply a DC constant added to an impulse train. The FS coefficients of impulse train is constant (non decreasing), and very easy. Then, simply apply the inverse derivative (1/jw) property, and, voila, you get the same expression (in fact, easier than these integrals).

  • @vincentbutton5926
    @vincentbutton5926 2 ปีที่แล้ว

    That was really nice!

  • @laurensiusfabianussteven6518
    @laurensiusfabianussteven6518 2 ปีที่แล้ว +1

    Its a bit tricky for the discontinuity part. This is very thematic

  • @jhuyt-
    @jhuyt- 2 ปีที่แล้ว

    what about calculating the laplace transform of the floor function? Don't think I've ever seen that done.

  • @SuperYoonHo
    @SuperYoonHo 2 ปีที่แล้ว

    Thanks cool

  • @BenfanichAbderrahmane
    @BenfanichAbderrahmane 2 ปีที่แล้ว

    I have never seen the proof of the Fourier series, thank you

  • @timsmith9942
    @timsmith9942 2 ปีที่แล้ว

    Great! Could you give an analysis of moving median function, please? It would be supercool. Thank you

  • @spicymickfool
    @spicymickfool 2 ปีที่แล้ว +1

    Is that a good place to stop? I'd expect to also have to find the transform of x. Didn't mention Kronecker Delta either. Is that just a thing among physicists?

    • @nikitakipriyanov7260
      @nikitakipriyanov7260 2 ปีที่แล้ว

      Kronecker delta is discrete, unfortunately. Dirac delta is continuous, and its fourier image is well known, as well as the derivative (Heaviside step function) and other properties.

  • @davidcroft95
    @davidcroft95 2 ปีที่แล้ว

    e^(-x) is not periodic, but you can still found its Fourier transform (1/(1-w) if I remember correctly)

    • @gcewing
      @gcewing 2 ปีที่แล้ว +1

      Fourier *transform* yes, but Fourier *series* are only defined for periodic functions.

    • @davidcroft95
      @davidcroft95 2 ปีที่แล้ว

      @@gcewing they are calculated in the same way tho

    • @almightysapling
      @almightysapling 2 ปีที่แล้ว +1

      They are computed "the same", sure, but that doesn't make the same. A Fourier transform swaps the domain of a function with the Dual Domain. The dual of the real line is the real line.
      A periodic function is "really" not a function with domain R, it's a function on a circle domain instead. And the dual of the circle is Z, the integers, which is why periodic functions get "series" instead of "transforms".

  • @peterlangdon6043
    @peterlangdon6043 2 ปีที่แล้ว

    Love the t-shirt. 😆

  • @theproofessayist8441
    @theproofessayist8441 2 ปีที่แล้ว

    Is the multiplication of sin(2*pi*m*x) where m is a new integer after that neat result we got for an integer n to find the Fourier series of the fractional part and a subsequent period? Otherwise I'm wondering where the idea for the step comes from at 5:29? ERROR/UPDATE - stand corrected Dr. Penn does not apply it to the test function until 8:40 ish. Is what he did prior hand standard Fourier Analysis stuff?

  • @perappelgren948
    @perappelgren948 2 ปีที่แล้ว +6

    Once again, a very interesting video delivered in an appetizing format 😎. A future elaboration could encompass the meaning of the "=" sign when stating that something has a Fourier series. For instance, what happens close to the end points? And, what does the Fourier series diverging (can this happen? 😏) at a certain x value tell us about the function in the vicinity of that particular x value?
    Anyhow... Once a great video. Thanks, prof P!

  • @stevenmellemans7215
    @stevenmellemans7215 2 ปีที่แล้ว +1

    I wonder why you love the floor function so much. I hate it. I find it useful, but I hate it. It fried my brain more than I like to admit.

  • @Jack_Callcott_AU
    @Jack_Callcott_AU 2 ปีที่แล้ว +1

    Does that definition of the floor function work for negative numbers ? e.g. floor( -3.6) = -4 , but -3.6 - { -3.6} = -3. Does it not?

    • @notfancy2000
      @notfancy2000 2 ปีที่แล้ว +1

      Recall that {-3.6} = 0.4

  • @littlekeegs8805
    @littlekeegs8805 2 ปีที่แล้ว +1

    Something about the final result seems off... if you plug in an integer for x, you should get x back, but don't you get x - 1/2 instead?

    • @littlekeegs8805
      @littlekeegs8805 2 ปีที่แล้ว

      Ah, there you have it
      en.wikipedia.org/wiki/Floor_and_ceiling_functions#Continuity_and_series_expansions

    • @gcewing
      @gcewing 2 ปีที่แล้ว +1

      Yeah, it's not _exactly_ the floor function, but it's the closest you can get using a Fourier series.

  • @ojasdeshpande7296
    @ojasdeshpande7296 2 ปีที่แล้ว

    At 8:16 shouldn't it be the (sum of b_m) = integral(fsin....) Instead of just b_m

  • @aristo7051
    @aristo7051 2 ปีที่แล้ว

    I’m not sure if you’ve mentioned before but why is the floor function your favourite?

  • @chrkts4191
    @chrkts4191 2 ปีที่แล้ว

    Its not of sin series cuz u have the x factor on the right side. U should expand that too. What gives then?

  • @abrahammekonnen
    @abrahammekonnen 2 ปีที่แล้ว

    3:16 The integral of a constant is that constant times x, right?
    So in this case int(a_0) = (a_0)x, right?

    • @kuzu2104
      @kuzu2104 2 ปีที่แล้ว +1

      Yes, however integral *from 0 to 1* of a_0 is a_0

    • @abrahammekonnen
      @abrahammekonnen 2 ปีที่แล้ว

      @@kuzu2104 ahh I'm dumb lol. Thank you

  • @lucachiesura5191
    @lucachiesura5191 2 ปีที่แล้ว

    where is the floor?

  • @scottmiller2591
    @scottmiller2591 2 ปีที่แล้ว

    Being naturally lazy, I probably would have set m \in \mathbb{Z} rather than \in \mathbb{N}. Then m=0 gives the result for a_0.
    Also, based on your earlier video, this gives a Fourier series for arctan(cot(2 \pi x)) as the (unsigned) last term.

  • @__hannibaal__
    @__hannibaal__ 2 ปีที่แล้ว

    I saw that it’s your favorite function;

  • @curtmcd
    @curtmcd 2 ปีที่แล้ว

    What happens if you plug 0 or 1 into the final form?

  • @ebog4841
    @ebog4841 2 ปีที่แล้ว

    Floor (0) = -1/2. Got it.

    • @Vladimir_Pavlov
      @Vladimir_Pavlov 2 ปีที่แล้ว

      I just wrote an answer on this topic in the stream.

  • @erfanmohagheghian707
    @erfanmohagheghian707 2 ปีที่แล้ว

    What was all this insistence for? The final result is no a Fourier series! It's an amalgam!

  • @sanch023
    @sanch023 2 ปีที่แล้ว

    This very nice video just lost me for the integration of a nought with respect to x giving the very same a nought, not anything with respect to x... a nought times x??

    • @curtmcd
      @curtmcd 2 ปีที่แล้ว +3

      It is a0 times x, but then it is evaluated from x=0 to 1.

  • @JacobHa
    @JacobHa 2 ปีที่แล้ว

    I previously tought that a Fourier series can only contain constant and sin cos term and cannot contain an x

    • @briemann4124
      @briemann4124 2 ปีที่แล้ว +2

      He explains that it’s not really a Fourier series near the beginning because it isn’t a periodic function.

    • @JacobHa
      @JacobHa 2 ปีที่แล้ว

      @@briemann4124 oh my bad, I hear it now. Thank you for pointing it out again.

  • @와우-m1y
    @와우-m1y 2 ปีที่แล้ว +1

    asnwer=1 isit