computing the degree of exactness for a quadrature formula I am reading Numerical Analysis and I have some problems on how to use in practice the definition of the '$\textbf{Degree of Exactness}$'.
$\textbf{Definition:}$ Let $I_n(f)$ be a quadrature formula for integrating $f$ in the interval $[a,b]$ and $I(f)$ be the actual value of the integral. The Degree of Exactness of a quadrature formula is defined as the maximum integer $r\geq0$ for which $I_n(f)=I(f)$, $\forall f \in \mathbb{P}_r$ ($f$ is from the polynomials of degree $r$).
I understand the definition but how can I use it to compute the actual degree of exactness of a quadrature formula, for example the following question and the following theorem (from Numerical Mathematics, Quarteroni).
$\textbf{Example:}$
Compute the degree of exactness for the formula: $$I_3(f)=\frac{1}{4}[f(-1)+f(-\frac{1}{3})+f(\frac{1}{3})+f(1)]$$
$\textbf{Theorem:}$
Any interpolating quadrature formula that makes use of $n+1$ distinct points has degree of exactness equal to at least $n$.
And could anyone please provide any links to some examples of this type or maybe some reading that explain this subject in depth.
 A: It's easier than you are making it.  To show degree of exactness $r$, it suffices to check exactness on a basis of polynomials of degree $r$, e.g. check $1,x,\ldots,x^r$.  This check is also a necessary condition, so it's pretty efficient.

Added: Let's try to address the example given in the Question:
$$ I_3(f) = \frac{1}{4}[f(-1)+f(-1/3)+f(1/3)+f(1)] $$
According the Comments by Albanian_EAGLE, no mention is made of what interval this "Lagrange quadrature" rule should apply to.  Let's try to discover what interval give us the highest 'Degree of Exactness'.
Considering its use with constants, $I_3(1) = 1$.  This is correct only on an interval of length 1, so the natural supposition that it should be used for $[-1,1]$, the smallest real interval containing the quadrature nodes, must be incorrect (since that interval is length 2).
The next best guess is an interval of length 1 that is centered on the origin, namely $[-\frac{1}{2},\frac{1}{2}]$.  Not only is $I_3(1) = 1$ exact for this smaller interval, we also have (by symmetry about the origin) that $I_3(x) = 0$ is exact.
Thus for $[-\frac{1}{2},\frac{1}{2}]$ the quadrature rule is exact for polynomials of degree $r \le 1$.  However $I_3(x^2) = \frac{5}{9}$ while $\int_{0.5}^{0.5} x^2 dx = \frac{1}{12}$, so that $r = 1$ is the highest degree for which the quadrature rule is exact on this smaller interval.
