Simpson's rule — where did the coefficients come from? I am reading how Simpson's Rule works for numerical integration. So I understand that given the two endpoints $x_0$ and $x_2$, and one intermediate point $x_1$, we can connect these points to make a parabolic function as an approximation to the original function which we want to integrate. 
The book then proceeds to give the following formula, which I do not understand. 

Where did the coefficients of $f(x_0), f(x_1), f(x_2)$ come from? 

Let 
$$F(x)={(x-x_1)(x-x_2)\over(x_0-x_1)(x_0-x_2)}f(x_0)+{(x-x_0)(x-x_2)\over(x_1-x_0)(x_1-x_2)}f(x_1)+{(x-x_0)(x-x_1)\over(x_2-x_0)(x_2-x_1)}f(x_2)$$
Note that
$$\begin{align}
F(x_0)&={(x_0-x_1)(x_0-x_2)\over(x_0-x_1)(x_0-x_2)}f(x_0)+{(x_0-x_0)(x_0-x_2)\over(x_1-x_0)(x_1-x_2)}f(x_1)+{(x_0-x_0)(x_0-x_1)\over(x_2-x_0)(x_2-x_1)}f(x_2)\\
&=1\cdot f(x_0)+0\cdot f(x_1)+0\cdot f(x_2)\\
&=f(x_0)
\end{align}$$
Likewise, we find that 
$$F(x_1)=0\cdot f(x_0)+1\cdot f(x_1)+0\cdot f(x_2)=f(x_1)$$
and
$$F(x_2)=0\cdot f(x_0)+0\cdot f(x_1)+1\cdot f(x_2)=f(x_2)$$
In other words, the coefficients of $f(x_0)$, $f(x_1)$, $f(x_2)$ are chosen so that each becomes appropriately $1$ or $0$ when we plug in $x=x_0$, $x_1$, and $x_2$; the numerator in each coefficient is what makes it $0$ or not; the denominator is what makes the coefficient equal to $1$ when it's nonzero.
A remark on terminology: Each of the "coefficients" here is a quadratic in $x$, so the function $F(x)$ is a quadratic polynomial, $F(x)=Ax^2+Bx+C$, where the "coefficients" $A$, $B$, $C$ are functions of $x_0$, $x_1$, $x_2$. Don't confuse one set of coefficients with the other!
