On Mon, 2008-04-07 at 23:28 +0200, Bart Vandewoestyne wrote:
> I would like to do this using Maxima. The integral I need to
> calculate is
>
> (%i8) integrate(abs(2*x*sin(x)-cos(1/x)), x, 0, 2/%pi);
(%i9) quad_qags(abs(2*x*sin(x)-cos(1/x)), x, 0, 2/%pi);
***MESSAGE FROM ROUTINE DQAGS IN LIBRARY SLATEC.
***INFORMATIVE MESSAGE, PROG CONTINUES, TRACEBACK REQUESTED
* ABNORMAL RETURN
* ERROR NUMBER = 1
*
***END OF MESSAGE
(%o9) [.5254584214118198, 2.7506663065146597e-4, 8379, 1]
I don't know if the returned value (.525...) is correct. The error code
1 means it had to take too many sub-intervals. Look at "? quad_qags"
Jaime