We know that the n-point Newton-Cotes quadrature rule is given by: $$\int_0^h f(x) \,dx = \sum_{i=1}^n w_if(x_i)$$
However, what is the general form of the expected error term for these Newton-Cotes formulae? Moreover, given this quadrature rule, how obvious is it to show that: $$\sum_{i=1}^nw_i = h$$
I am new to this topic of numerical integration, so any guidance would be appreciated.
It is very easy to show that $\sum w_i = h$: it corresponds to the quadrature being exact for polynomials of degree 0. Regarding the error formula, it is derived from the interpolation error:
$$ \int_0^h f(x) dx - \int_0^h p_{n-1}(x)dx = \int_0^h \frac{f^{(n)}(\xi_x)}{n!}(x-x_0)\cdots (x-x_n) dx $$
For any particular $n$, you may manipulate this expression to get rid of the integral. If you look up the proof for the trapezoidal and the Simpson rules, you'll be equipped with all the necessary machinery.