I try
quad_qag(abs(2*x*sin(x)-cos(1/x)),x,10^-5,2/%pi,6,1e-13,2000);
and obtain
[0.52563395383224, 3.3502523209170927E-4, 66429, 2]
in Maxima.
On the other hand with Mathematica and the following command
NIntegrate[Abs[2*x*Sin[x] - Cos[1/x]], {x, 0, 2/\[Pi]}, WorkingPrecision -> 40, MaxRecursion -> 40, Method -> {GlobalAdaptive, MaxErrorIncreases -> 20000}]
I get the following result [with the warning message : "The global error of the strategy GlobalAdaptive has increased more than 20000 times."]
0.5256329175491898395871901357174950580337
But if the function is ...sin(1/x)... then
quad_qag(abs(2*x*sin(1/x)-cos(1/x)),x,0,2/%pi,6,1e-13,2000);
returns
[0.60537368892772, 4.2781424504079489E-4, 54107, 2]
to be compared with Mathematica's
NIntegrate[Abs[2*x*Sin[1/x] - Cos[1/x]], {x, 0, 2/\[Pi]}, WorkingPrecision -> 40, MaxRecursion -> 40, Method -> {GlobalAdaptive, MaxErrorIncreases -> 20000}]
which in turn gives [with the same warning]
0.6053662488112157261060012857414032734650
Just for comparison.
~Shahir