Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Question about fitting periodic data

  1. Apr 22, 2016 #1
    My experience with data fitting is poor so I am in real need for help.
    The potential in the following is periodic over [0,Pi]
    I need to find a fitting function that I can use to perform further mathematics. Fourier series does not work, but a 40-degree polynomial give the following fit
    However, the polynomial does not preserve its periodicity over the cycle. Could someone please advice what I should do to get a good fitting function for my data?
  2. jcsd
  3. Apr 22, 2016 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Fitting with a polynomial with degree larger than 3 is a really bad idea.

    Why don't you try to fit this function with a combination of straight lines?? And why do Fourier series not work?
  4. Apr 22, 2016 #3


    User Avatar
    2016 Award

    Staff: Mentor

    A set of straight lines for different ranges should fit best. A Fourier series should give reasonable approximations, but only if you include many terms.
  5. Apr 23, 2016 #4


    User Avatar
    Science Advisor

    Looking at the vertical scale: Is your data set really constricted to the value -9.74771?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Question about fitting periodic data
  1. Model fitting to data (Replies: 2)