# Trouble doing polynomial interpolation

I need to do a polynomial interpolation of a set $N$ of experimental points; the functional form I have to use to interpolate is this: $$f(x) = a + bx^2 + cx^4,$$ as you can see the coefficient that I need to find are just 3: $a, b, c$; however the points I have are $\#N>3$ and so it looks like the determination of the coefficients is impossible because is over-determined. Does anyone have an idea of what should be done in such case (supposing it is even possible)?

• Strictly speaking interpolation means an exact fit of a curve through data points. As you have $N\gt 3$, the problem is overdetermined, as you suspect, and you cannot in general interpolate. However a least-squares approximation or some other form of best-fit-criterion is available. – hardmath Jan 7 '15 at 1:42
• It was x^4... my bad... now the function is correct... and yes N> 3 which is weird but that's what I am asked to do... – Federico Gentile Jan 7 '15 at 1:58
• Have you thought about doing a least squares regression? – ncmathsadist Jan 7 '15 at 2:08
• It may be possible to solve if you determine the polynomial using N=3 and then the other points happen to be on its graph. – Mary Jan 7 '15 at 2:12
• Look up the terms "linear regression" or "ordinary least squares". Basically, the best you can do for real data that don't exactly fit is to find a function of that form that goes through your data approximately. – rajb245 Jan 7 '15 at 3:37

## 1 Answer

Since the system is overdetermined, there is ideally no solution.Hoever things like least square fit etc. are still possible, and this will be fitting a polynomial to a given graph. An easy way would be to treat it like a linear equation (trat 1, x, x^2 as columns of matrix) and then solve using Y=bX. X wont be invertible, but use any matrix algebra package to find least square solution.

• thanks for the answer; unfortunately I am not allowed to use any other technique but the functional form I was give; the only way I had to handle it was to pick 3 points from the set of which I was quite sure of and I searched for the 3 coefficient... after all the interpolation I got was quite acceptable – Federico Gentile Jan 7 '15 at 13:56