questions on polynomial Lagrange Interpolation of order $n$? I ran in One Ex in my book when I‌ prepare for final exam on numerical method. how can help me how we solve such a problem?
if $P(x)$ and $Q(x)$ be two polynomial Lagrange Interpolation of order $n$ in Nodal points {$‌ (x_i, y_i):i=0,...,n \}$ and   {‌ $(x_i, y_i):i=1,...,n+1 \}$. what is the  polynomial Lagrange Interpolation of at most order $n+1$ for nodal point  {‌ $(x_i, y_i):i=0,...,n+1 \}$
 A: Here is a way to derive the answer you got. The polynomial you are after is given by (the standard Lagrange formula)
$$y(x) = \sum_{i=0}^{n+1} y_i\prod_{j=0,j\not= i}^{n+1} \frac{x-x_j}{x_i-x_j}$$
while the polynomials $P$ and $Q$ are given by (again just the standard Lagrange formula) 
$$P(x) = \sum_{i=0}^n y_i\prod_{j=0,j\not= i}^n \frac{x-x_j}{x_i-x_j},~~~~~~Q(x) = \sum_{i=1}^{n+1} y_i\prod_{j=1,j\not= i}^{n+1} \frac{x-x_j}{x_i-x_j}$$
Now try to write them on the same form as $y(x)$ by making the product go from $j=0$ to $j=n+1$ in both expressions:
$$P(x) = \sum_{i=0}^n y_i \frac{x_i-x_{n+1}}{x-x_{n+1}}\prod_{j=0,j\not= i}^{n+1} \frac{x-x_j}{x_i-x_j},~~~~~Q(x) = \sum_{i=1}^{n+1} y_i\frac{x_i-x_{0}}{x-x_0}\prod_{j=0,j\not= i}^{n+1} \frac{x-x_j}{x_i-x_j}$$
Note that we can extend the upper summation limit to $n+1$ for $Q$ and the lower to $0$ for $P$ (since the summation term vanishes for this value). This gives
$$(x-x_{0})Q(x) - (x-x_{n+1}) P(x) = (x_{n+1}-x_0)\sum_{i=0}^{n+1} y_i\prod_{j=0,j\not= i}^{n+1} \frac{x-x_j}{x_i-x_j} = (x_{n+1}-x_0)y(x)$$
and it follows that
$$y(x) = \frac{(x-x_{0})Q(x) - (x-x_{n+1}) P(x)}{x_{n+1}-x_0}$$
As a double check of the result it is easy to calculate that $y(x) = y_i$ for all $i=0,1,2\ldots,n+1$.
