Evaluating Integrals for 5th and 4th order polynomials

  • Context: MHB 
  • Thread starter Thread starter labrat1
  • Start date Start date
  • Tags Tags
    Integrals Polynomials
Click For Summary
SUMMARY

This discussion centers on the evaluation of integrals for 5th and 4th order polynomial functions fitted to a dataset. The user initially expected similar integral values for both functions but found significant discrepancies. The issue was identified as incorrect coefficients in the 4th order polynomial due to rounding errors in Excel, which led to inaccurate integral calculations. The user resolved the problem by adjusting the decimal precision of the coefficients.

PREREQUISITES
  • Understanding of polynomial regression, specifically 4th and 5th order polynomials.
  • Knowledge of integral calculus and antiderivatives.
  • Familiarity with Excel for data analysis and coefficient rounding issues.
  • Basic statistical analysis to evaluate model fit and discrepancies.
NEXT STEPS
  • Review polynomial regression techniques in Python using libraries like NumPy or SciPy.
  • Learn about integral evaluation methods for polynomial functions.
  • Explore logistic regression as an alternative modeling technique for datasets.
  • Investigate best practices for managing significant figures and rounding in Excel.
USEFUL FOR

Data analysts, statisticians, and researchers involved in polynomial modeling and integral evaluation will benefit from this discussion.

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!
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
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 8 ·
Replies
8
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K