# Writing Lagrange form of an interpolating polynomial

Write the Lagrange form of the interpolating polynomial of degree at most 2 that interpolates $f(x)$ at $x_0, x_1,$ and $x_2$, where $x_0<x_1<x_2$

I'm guessing I would start at (not sure how the inequalities come into effect): $$P_2(x)=y_0\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}+y_1\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}+y_2\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}$$

Can this be simplified? Thanks for any help!