Let $\left(x_{0}, y_{0}\right),\left(x_{1}, y_{1}\right),$ and $\left(x_{2}, y_{2}\right)$ be points in the Euclidean plane $\mathbf{R}^{2}$ such that $x_{0}, x_{1}, x_{2}$ are distinct. Show that the formula
$$
f(x)=\frac{y_{0}\left(x-x_{1}\right)\left(x-x_{2}\right)}{\left(x_{0}-x_{1}\right)\left(x_{0}-x_{2}\right)}+\frac{y_{1}\left(x-x_{0}\right)\left(x-x_{2}\right)}{\left(x_{1}-x_{0}\right)\left(x_{1}-x_{2}\right)}+\frac{y_{2}\left(x-x_{0}\right)\left(x-x_{1}\right)}{\left(x_{2}-x_{0}\right)\left(x_{2}-x_{1}\right)}
$$
defines a polynomial $f(x)$ such that $f\left(x_{0}\right)=y_{0}, f\left(x_{1}\right)=y_{1},$ and $f\left(x_{2}\right)=y_{2}$. Note: This is a special case of Lagrange's interpolation formula.