Given five ${x}$ points and for four of them I know ${f(x)}$ values.
So I have to use interpolating polynomial to estimate unknown ${f(x_i)}$
${ \displaystyle f(x) = \sum_{j=1}^{n} P_j{(x)} }$ with ${ \displaystyle P_j{(x)} = y_j \prod_{k=1, k \neq j}^{n} \frac{x-x_k}{x_j - x_k} }$
Task requires me to use both:
- a degree one interpolating polynomial
- a degree two interpolating polynomial
But I don't understand what is the difference.
An interpolating polynomial is one that goes exactly through the points of interest. As two points determine a line, a degree one interpolating polynomial can only go through two points (unless there is an accident and another point is on the same line.) Formally, if $n \gt 2$ in your product, there will be terms in $x^2$ and $f(x)$ is no longer linear. If you want a degree two polynomial, you can accept $n=3$ as the polynomial will be quadratic. That is the difference.
From a notation point of view, you would usually say that given points you know the $f(x_i)$ values, as the subscript $i$ indicates discrete values and you want to estimate $f(x)$ as without the subscript it indicates continuous values for $x$.