# Find the polynomial of at most 1 degree using Lagrange Polynomial

I am asked to construct an interpolating polynomial of at most degree one and two. I am attempting to use Lagrange polynomials, but I have already tried using general polynomials that lead to a system of equations and Taylor series. My function is $$f(x)= \sin(\pi x)$$ and my x values are $\{1,1.25,1.6\}$ and I am approximating $$f(1.4)$$ My question is how can I use Lagrange polynomials to calculate a polynomial of at most one degree? For example, I know that $$l_0(x) = \frac{(x-x_1)(x-x_2)}{(x_0 - x_1)(x_0-x_2)}$$ and $$l_1(x) = \frac{(x-x_0)(x-x_2)}{(x_1 - x_0)(x_1-x_2)}$$ and so forth, but clearly, neither of these equations will produce a polynomial of at most degree 1. So which point to I leave out and why? It seems a good choice would be to leave out the $(x-x_1)$ term since it is between $1$ and $1.6$. So, is this the correct choice and is the reasoning for choosing it correct ? $$l_0(x) = \frac{(x-x_2)}{(x_0 - x_1)}$$

I did the average between $1.25$ and $1.6$ getting $1.425$ so my data are

$\{(1, 0), (1.425, -0.97237)\}$

and the line has equation

$q(x)=2.28793\, -2.28793 x$

Computing at $x=1.4$ I got

$q(1.4)\approx -0.915172$

The actual value of $\sin \pi x$ is

$f(1.4)\approx -0.951057$

and the value with the second degree polynomial

$P(x)=3.55238 x^2-10.8213 x+7.2689$

$P(1.4)\approx -0.918228$

Not much better than the first degree

Doing as you wanted to do leads to the polynomial

$r(x)=1.58509-1.58509x$

and

$r(1.4)\approx -0.634038$

The value is very poor. If you look at the graph you will understand the reason why

Hope this helps

$$...$$ 