n well-chosen points integrate every polynomial of degree ≤ 2n − 1 exactly. Here is how, and why.
Exercise 2.5.10: for all a < b there are reals c₀, …, cₖ such that ∫ₐᵇ p(t) dt = Σ cᵢ p(i) whenever deg p ≤ k. Integration is a linear functional, and the exercise says it can be written as a weighted sum of point values. Any k + 1 distinct points will do, but some are far better than others. Put n points at the roots of the Legendre polynomial Pₙ and the sum is exact for degree up to 2n − 1, twice what the exercise promises, with weights that are all positive.
Everything is on [−1, 1]. Any other interval is a linear change of variables away.