So for a paper I am writing I am using Lagrange polynomial interpolation:
$$P(x)=\sum_{i=0}^{N}f(x_i) \cdot \prod_{j=0;j\neq i}^{N}\frac{x-x_j}{x_i-x_j}$$
And I need to find an expression that describes each term. Like I put $k = 1$ and get the constant term, then $k = 2$ for the $x$ - term, etc. I don't mind if it's really complicated but I just need an expression for the coefficient for an arbitrary term. Just wondering if this is even possible, or if someone could point me in the right direction..
Any help is greatly appreciated, Thank you!
To go about finding the coefficients for the various powers of $x$, we first look at the product portion. Looking at $$\prod_{j=0; j \neq i}^{N}\frac{x-x_i}{x_j-x_i}$$ we find that the full product of the denominator will be in the coefficient of any power of $x$. Pulling that out and looking at the numerator, we find $$\prod_{j=0; j \neq i}^{N} x-x_i = (x-x_i)^N$$ Here we can pick out the various powers of $x$. The coefficient for each term in this polynomial is $$\binom{N}{k}(-x_i)^{N-k}$$ where $k$ is the power of the corresponding $x$.
Now taking into account the product that we initially ignored and the sum out front we find $$C(k)=\sum_{i=0}^N \binom{N}{k}(-x_i)^{N-k}f(x_i)\prod_{j=0; j \neq i}^{N}\frac{1}{x_j-x_i}.$$
I hope this helps!