MHB Evaluating Integrals for 5th and 4th order polynomials

Click For Summary
The discussion revolves around the evaluation of integrals for 5th and 4th order polynomial fits to a dataset. The user noticed significant discrepancies in integral values despite the functions being similar. It was identified that the coefficients for the 4th order polynomial were likely incorrect, leading to inaccurate integral results. Upon further examination, rounding errors in Excel were discovered, which contributed to the discrepancies. The user resolved the issue by correcting the displayed decimal places, highlighting the importance of precision in calculations.
labrat1
Messages
2
Reaction score
0
Hi! I have a dataset that I fit to a 5th order and 4th order polynomial -- I was just trying to get the function that best fit the data. However, I realized that when I evaluate the integral for these 2 different functions (between 200 and 400), the answers are vastly different. I assumed since the functions are extremely similar and are describing the same dataset, I should get the same (or very similar) values for these integrals. Is there a reason why they wouldn't be the same?

I have checked the math multiple times and I may be missing something really obvious, but I can't find anything wrong in the basic math of each integral.

I am not sure if this is against the rules of this board (sorry if it is!) -- but since we can't attach excel spreadsheets, I uploaded it to google and the link is below:

https://docs.google.com/spreadsheets/d/1Vm-knOkTM7IH3BTxOngdwvHggsK3SPV0i0wwbhCgQBo/edit?usp=sharing

Thanks!
 
Physics news on Phys.org
Hello and welcome to MHB, labrat!

It seems to me that the coefficients of your 4th order polynomial are off. The area you get with your 5th order polynomial makes more sense than the one you get with the 4th order approximation. I can't find any problems with the way you calculated your antiderivatives, so it seems to me that you made a mistake somewhere in the 4th order regression.
You might also want to consider using a logistic function rather than a polynomial to model your data.

[EDIT] Yes, your coefficients seem to be wrong for the 4th order regression. When I run the numbers for x=200, I get about .45-in approximate agreement with the data (the actual value is about .43). But when I plug in x=400, I get 1.29, which is horribly wrong-the actual number is around .93.
 
Last edited:
Thank you jacobi!

After looking at both functions again, I realized that I didn't previously check the number of decimal places displayed in excel. Both equations had coefficients rounded to 2 significant figures -- so I had ended up with a lot of rounding error. Easy mistake to fix! Thank you!
 
Thread 'Problem with calculating projections of curl using rotation of contour'
Hello! I tried to calculate projections of curl using rotation of coordinate system but I encountered with following problem. Given: ##rot_xA=\frac{\partial A_z}{\partial y}-\frac{\partial A_y}{\partial z}=0## ##rot_yA=\frac{\partial A_x}{\partial z}-\frac{\partial A_z}{\partial x}=1## ##rot_zA=\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y}=0## I rotated ##yz##-plane of this coordinate system by an angle ##45## degrees about ##x##-axis and used rotation matrix to...

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
0
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K