Example 1. Find the Lagrange interpolation polynomial that takes the values $y_{0}=-5, y_{1}=-11, y_{2}=10$ at the points $x_{0}=-3, x_{1}=-1, x_{2}=2$.
Solution. When $n=2$, formula (15.1) takes the form

$$
P_{2}(x)=y_{0} \frac{\left(x-x_{1}\right)\left(x-x_{2}\right)}{\left(x_{0}-x_{1}\right)\left(x_{0}-x_{2}\right)}+y_{1} \frac{\left(x-x_{0}\right)\left(x-x_{2}\right)}{\left(x_{1}-x_{0}\right)\left(x_{1}-x_{2}\right)}+y_{2} \frac{\left(x-x_{0}\right)\left(x-x_{1}\right)}{\left(x_{2}-x_{0}\right)\left(x_{2}-x_{1}\right)}
$$

Substituting the given values into this formula, we find

$$
\begin{gathered}
P_{2}(x)=-5 \frac{(x+1)(x-2)}{(-3+1)(-3-2)}-11 \frac{(x+3)(x-2)}{(-1+3)(-1-2)}+10 \frac{(x+3)(x+1)}{(2+3)(2+1)} \\
P_{2}(x)=-\frac{1}{2}\left(x^{2}-x-2\right)+\frac{11}{6}\left(x^{2}+x-6\right)+\frac{2}{3}\left(x^{2}+4 x+3\right)= \\
=\frac{1}{6}\left[-3\left(x^{2}-x-2\right)+11\left(x^{2}+x-6\right)+4\left(x^{2}+4 x+3\right)\right]=\frac{1}{6}\left(12 x^{2}+30 x-48\right)
\end{gathered}
$$

Therefore, $P_{2}(x)=2 x^{2}+5 x-8$.