# 3rd order polynomial

• Mar 4th 2013, 10:03 AM
aziqbal
3rd order polynomial
When I plot the following data set for x,y

0,280.32
60,437.03
120,441.10
180,434.34

I get a curve, that best fits to a 3rd order polynomial which is this equation

y=0.0001x^3 - 0.0409x^2 + 4.6716x + 280.32

However, when I re-enter in my x values on my calculator And do the Maths for the equation I do not get the resulting y values which I originally started with, I get out

0,280.32 which is correct
60,434.97 which is a little bit off
120,424.752 far off
180,379.248 which is very far off

I did the above in my calulator and online so both are wrong

why are my last 3 y-values different? And how can I get around this? Basically, I want to calculate all the y values for every x value I enter.
• Mar 4th 2013, 11:27 AM
ebaines
Re: 3rd order polynomial
When I plug the values of x into the equation you wrote I get:

(0,280.32)
(60, 437.011)
(120, 441.032)
(180, 434.193)

which is a lot closer than your calculation woudl indicate. I don't know why your calculator is giving you answers that are so far off - but I'm guessing that yuo may have used 4.6713 instead of 4.6717 for the third coefficient.

Also, consider how you have rounded off the coefficients, especially the second one which is good to only three signficant digits (0.0409). Given this rounding the result can be expected to be accurate to only three significant digits as well. If you want more accuracy you need to provide more digits. Try:

y = 0.0001x^3 - 0.0408958x^2 + 4.671667x + 280.32
• Mar 4th 2013, 12:46 PM
aziqbal
Re: 3rd order polynomial
Can you post your calculation? Exactly the numbers you used

Yes I tried that too but it made hardly any difference, I mean the rounding shouldn't make that much difference should it?

Here's a worked example

0.0001(120^3) -0.0409(120^2)+4.6716(120)+280.32

=172.8-588.96+560.59+280.32

=424.73 when the y value is actually 441.10!!

I'm thinking can there be more than 1 x solution for each y vaue?
• Mar 4th 2013, 01:24 PM
ebaines
Re: 3rd order polynomial
The accuracy of the first coedfficient is very important. You have 0,0001, but a more accurate number is 0.0010942. This is an increase of almost 10%, and when you multiply it by a large number like 120^3 it makes a big difference. Here's the math:

0.0001(120^3) -0.0409(120^2)+4.6716(120)+280.32 = 172.8-588.96+560.59+280.32 = 424.73

My version, using 5 significant digits for the coefficients:
0.00010942(120^3)- 0.040896(120^2)+4.6717(120)+280.32 = 189.08 - 588.90 + 560.6 +280.32 = 441.10
• Mar 5th 2013, 12:11 AM
aziqbal
Re: 3rd order polynomial
Quote:

Originally Posted by ebaines
The accuracy of the first coedfficient is very important. You have 0,0001, but a more accurate number is 0.0010942. This is an increase of almost 10%, and when you multiply it by a large number like 120^3 it makes a big difference. Here's the math: