Question about fitting periodic data

Click For Summary

Discussion Overview

The discussion revolves around the challenge of fitting periodic data within the interval [0, Pi]. Participants explore various fitting functions and methods, including polynomials and Fourier series, while addressing the limitations of these approaches.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant expresses difficulty in data fitting and notes that a 40-degree polynomial does not maintain periodicity.
  • Another participant argues against using polynomials of degree greater than 3 for fitting, suggesting instead a combination of straight lines.
  • Some participants propose that a Fourier series could provide reasonable approximations if sufficiently many terms are included, questioning the initial claim that Fourier series do not work.
  • A later reply questions the validity of the data set's vertical scale, specifically referencing a value of -9.74771.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best fitting method, with multiple competing views on the effectiveness of polynomials versus straight lines and Fourier series remaining unresolved.

Contextual Notes

There are limitations regarding the assumptions about the data set and the definitions of periodicity and fitting accuracy that are not fully explored in the discussion.

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
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?
 
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.
 
Looking at the vertical scale: Is your data set really constricted to the value -9.74771?
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
24
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
9K