# Polynomial interpolation vs polynomial curve fitting

If we have $$n + 1$$ points $$(x_i,y_i$$), then we can use interpolation methods (Lagrange, ...etc) to find a polynomial of degree $$n$$: $$P_n(x) = a_0 + a_1x + a_2x^2 + \cdots a_nx^n$$

In curve fitting, we search for a polynomial that best fits the points (minimizes the squared error).

But what if we want to use polynomial curve fitting (a.k.a polynomial regression)to find the polynomial of degree $$n$$: $$Q_n(x) = b_0 + b_1x + b_2x^2 + \cdots b_nx^n$$

After testing this in Excel, I found that the interpolation and the polynomial regression of degree $$n$$ give the same polynomial.

So my conclusion is that: Using polynomial interpolation through $$n+1$$ points is equivalent to use polynomial curve fitting of degree $$n$$.

Am I right?

Thanks

(I am refering only to polynomial interpolation not piece-wise interpolation)

You are right. Note that in both cases, we have $$n+1$$ unknown coefficients. Finding the interpolation polynomial of degree $$n$$ means solving a system of $$n+1$$ linear equations; one corresponding to each point $$(x_i,y_i)$$. In general, when applying regression, there are many more data points than there are coefficients. The coefficients are then found by solving the least-squares system. However, in your case the polynomial can be fitted exactly, as there are just as much data points as there are coefficients.