MHB Evaluating Integrals for 5th and 4th order polynomials

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!
 
Back
Top