I was playing in Matlab when the following occured: I had an integral $I$ which I computed with the (a) Composite Simpson's Rule and (b) Adaptive Simpson's Method (my teacher told me that the built-in function quad in Matlab uses this method). These computations resulted in two approximations $I_1,I_2$ of $I$ for (a) and (b) respectively.
Prior to these computations I computed a reference solution to the problem, that is: an approximation of $I$ with a very low tolerance level (for example $10^{-15}$, compared to $10^{-6}$ which was used in later computations). Call this reference solution (approximation) $I_*$.
After finding $I_*$ I was able to compare $|I_1-I_*|$ with $|I_2-I_*|$. To my surprise $|I_1-I_*|<|I_2-I_*|$, and so: method (a) was more effective than method (b) in this particular example.
Now follows a general question: is there some general condition(s) for which it is true that $|I_1-I_*|<|I_2-I_*|$?
EDIT: Put
$y(x)=\frac{1-\arctan(p(x-1))/\pi}{2-\cos(\pi x)}$.
I am integrating $\pi \cdot y^2$ over $0 \leq x \leq 2.6$:
$$\pi \int_0^{2.6} y(x)^2 dx.$$
For $p=1$ I found that $|I_1-I_*|>|I_2-I_*|$, for $p=1000$ I found that $|I_1-I_*|<|I_2-I_*|$.
Below is the graph of $\pi \cdot y(x)^2$ for $p=1, 1000$
