We shall construct the Lagrange interpolation polynomial of degree 2 for the fuction $f:x\to e^x$ on the interval $[-1,1]$ ,with interpolation points $x_0=-1,x_1=0,x_2=1$.
Solve:$(-1,e^{-1}),(0,1),(1,e)$.So the Lagrange interpolation polynomial of degree 2 is
\begin{equation}
g(x)=e^{-1}\frac{(x-0)(x-1)}{(-1-0)(-1-1)}+\frac{(x-(-1))(x-1)}{(0-(-1))(0-1)}+e\frac{(x-(-1))(x-0)}{(1-(-1))(1-0)}
\end{equation}