According to Chapter 5 of Numerical Methods and Software by Kahaner, et al. (1989), it can be shown that the error associated with Gaussian quadrature is
$\displaystyle\int_a^b f(x)\,dx - \sum_{i=1}^n w_i\,f(x_i) =\frac{(b-a)^{2n+1} (n!)^4}{(2n+1)[(2n)!]^3} f^{(2n)} (\xi) , \qquad a < \xi < b.$
How is this error derived?