I am trying to make Mathematica do the following: Split up the interval [0,1] into $n$ equal intervals. Then on each interval apply the Gaussian Quadrature for 2 points.
I tried to use the method from mky question here:Using Composite Newton-Cotes integration rules in Mathematica
But the results I am getting are way too accurate.
Here is the code:
n = 1;
NIntegrate[Sin[x]/x, Evaluate@Flatten@{x, Subdivide[0., 1., n]},
Method -> {"GaussBerntsenEspelidRule", "Points" -> 2},
MaxRecursion -> 0]
So what this should be doing is just do the Gaussian Quadrature with 2 points on $[0,1]$ but I am getting the answer with at least $10^{-5}$ accuracy which should not be happening. What did I do wrong?