Numerical Integration error for simpson's rule through taylor series I am looking at the derivation of the simpson's rule as well as an error analysis in my textbook and I am slightly confused over two things. Firstly, in the derivations, the text uses a taylor expansion of up to $ O(h^4)$. I am not exactly sure why it is only expanded up until this term. 
Secondly, in terms of the integral, I am not sure where the first term $f(x_{1})(x-x_{0})$ comes from. 

I understand the fact that he integrated the left hand side of the [4.22] equation and how he got every term except for the part about $f(x_{1})(x - x_{0})$, which I am not sure about. 
Would someone please help me clarify ? is this a definition that if you have 3 points, you can only do a taylor expansion up to the 4th order ?
Thanks
 A: That $f(x_1)(x-x_0)$ term is easy to explain: the author started with
$$\int f(x_1)dx=f(x_1)\int dx=f(x_1)(x+C)$$
wher C is the constant of integration. He could have chosen any constant here, but he went with $C=-x_0$. Then he gets
$$\int_{x_0}^{x_2}f(x_1)dx=\left.f(x_1)(x-x_0)\right|_{x_0}^{x_2}=f(x_1)(x_2-x_0)=2hf(x_1)$$
assuming $x_2-x_1=x_1-x_0=h$. The choice for the constant of integration $C$ is pretty much arbitrary, and I might have chosen $C=x_1$ so that the zero-order term looked consistent with the higher order terms, but the answer would have still been the same,
$$\int_{x_0}^{x_2}f(x_1)dx=\left.f(x_1)(x-x_1)\right|_{x_0}^{x_2}=f(x_1)\left((x_2-x_1)-(x_0-x_1)\right)=2hf(x_1)$$
He only took the expansion to third order because the first and third order terms integrate for $0$ and the zero and second order terms produce the integration formula, and we can get a really nice estimate of the error from the fourth order term; higher order terms would not give us such a clean estimate. Since $(x-x_1)^4\ge0$,
$$\int_{x_0}^{x_2}\min\left(f^{(4)}(\xi(x))\right)(x-x_1)^4dx\le\int_{x_0}^{x_2}f^{(4)}(\xi(x))(x-x_1)^4dx$$ $$\le\int_{x_0}^{x_2}\max\left(f^{(4)}(\xi(x))\right)(x-x_1)^4dx$$
So we can pull those extrema out of the integrals to get
$$\frac25h^5\min\left(f^{(4)}(\xi(x))\right)\le\int_{x_0}^{x_2}f^{(4)}(\xi(x))(x-x_1)^4dx\le\frac25h^5\max\left(f^{(4)}(\xi(x))\right)$$
So then we know that the error in Simpson's rule is
$$\frac1{24}\int_{x_0}^{x_2}f^{(4)}(\xi(x))(x-x_1)^4dx=\frac{h^5}{60}f^{(4)}(\xi)$$ for some $x_0<\xi<x_2$
Hmm, that's not the right answer because it should be $\frac{h^5}{90}f^{(4)}(\xi)$. I guess the difference is that we only have an estimate for $f^{\prime\prime}(x_1)$, not the true value.
