So I'm going through a chapter on Newton-Cotes quadrature formulas and everything's clear up until a certain point. First let me just get the notation stuff out of the way so we can be on the same page. In general, for numerical integration, we assume that we're integrating over $p(x)f(x)$ where $p(x)$ is the weight function. For the integration we use the notation:
$$I(f) = \int_a^bp(x)f(x)\,dx$$ Now if we've got a Lagrange polynomial of the function $f$ $$L_n(x) = \sum_{i=0}^n\Bigl(\prod_{\substack{j=0\\j\neq i}}^n\frac{x-x_j}{x_i-x_j}\Bigr)f(x_i)$$ We substitute it in the first formula and the we do lots of substitutions and what have you and we get: $$S_n(f) = \frac{b-a}{2}\sum_{i=0}^nc_if(x_i)\\ c_i = \int_{-1}^{+1}\bar{p}(t)\Bigl(\prod_{\substack{j=0\\j\neq i}}^n\frac{t-t_j}{t_i-t_j}\Bigr)\,dt$$ where $\bar{p}(t) = p(\frac{b+a}{2} - \frac{b-a}{2}t)$, and $t_i$ means the same substitution I've just mentioned $x = \frac{b+a}{2} + \frac{b-a}{2}t$ applied to the $i$-th node.
This is all fine and the only reason I've written it is because I wouldn't like to get an answer that uses completely different notation which would just confuse me even more.
Anyway, we introduce a Lemma:
If $p(x)$ is even around the middle of the interval $[a, b]$ and the nodes $x_k$ are symmetric around the middle of the interval, that is $t_k = -t_{n-k}$, then the quadrature formula coefficients of the symmetric nodes are equal: $c_k = c_{n-k}$.
This is also relatively easily proven.
Now comes the confusing part. The corollary of the lemma states:
If the nodes are symmetric (around the midpoint of the interval), and if $p(x)$ is even and if $f(x)$ is odd then the quadrature formula is correct (gives the exact integral value).
Now this is clear enough because they're both obviously going to be zero (the formula because of the symmetric nodes and the integral because it's an odd function over a symmetric interval).
Then further, as the corollary of that, they simply say:
Therefore the quadrature formula is correct for an arbitrary polynomial $P_{n+1}(x)$ if $n$ is even because it can be represented as $$P_{n+1}(x) = P_n(x) + c\Bigl(x-\frac{a+b}{2}\Bigr)^{n+1}$$ where $P_n(x)$ is an arbitrary polynomial of degree $n$ and $c$ is a constant.
I can't really see how they got to this conclusion. The first conclusion seemed like a very special case (where the integral is zero) but I can't figure out how they generalized it like this.
Any ideas? Thanks in advance.