Question about fitting periodic data

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 1K views
ftft
Messages
21
Reaction score
0
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]
-TvEuURwmnboNeDc1hN8aBhBkWcK4kYbjZhf4lPAZeE6fUeQvsEFcp56MUrHXa2Y9tATurVnxQLgm3EVsdR=w360-h211-no.gif

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
9iL8mytaLHj6GJp882dVJnCy-Nqr62qTLGS0dNx4JEdCKuJWhwD_DRFy3JoUr6X6kWcId3eSMQshzo9jtIM=w360-h215-no.gif

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?
 
Physics news on Phys.org
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.