I have recently studied Interpolation Techniques in my College Numerical Methods class and I have this question: If we have a function $f(x)$ and we are asked to use Least Squares Interpolation(LSI) to derive an approximating polynomial of the nth order, will that polynomial generally intersect the function at n+1 points like if we used Simple Interpolation(Vandermonde for instance)? I experimented a little with this and the experiments say "yes", but I don't know how to go about proving it analytically.
I tried to carry out the proof for a 1st degree LSI polynomial:
let the function we need to approximate be $f(x)$ and the interpolating polynomial $g(x) = ax + b$.
I then routinely minimized the square of the error while varying $a$ and $b$ to get the equation (p and q are the limits of the interval over which I integrated the square of the error):
$$\begin{bmatrix} \int_{p}^{q} x^2dx & \int_{p}^{q} x dx \\\int_{p}^{q} x dx&\int_{p}^{q} dx \end{bmatrix} \begin{bmatrix} a\\b \end{bmatrix} = \begin{bmatrix} \int_{p}^{q} xf(x)dx\\\int_{p}^{q} f(x)dx \end{bmatrix}$$ I then solved this equation to get $a$ and $b$, and consequently got g(x).
I then let $g(x) = f(x)$; or in full form, $$\scriptsize \frac{1}{\int_{p}^{q} dx \int_{p}^{q} x^2dx - \int_{p}^{q} x^2dx}[(\int_{p}^{q} xfdx \int_{p}^{q} dx - \int_{p}^{q} xdx \int_{p}^{q} fdx) *x + \int_{p}^{q} x^2fdx \int_{p}^{q}f dx - \int_{p}^{q} xdx \int_{p}^{q} xfdx] = f $$
Now, is it possible to prove that this equation will have 2 real solutions no matter what function we plug in there?