integral



On Tue, Apr 08, 2008 at 01:24:44PM +0100, Jaime Villate wrote:
> 
> 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"

I also tried this... but I don't trust this result... two people
on comp.soft-sys.math.maple reported a value of 0.6053..., each
obtained his result independently from the other... so i think
that is probably more correct.

They obtained it by integrating between the zeros of the function
and summing the results.

See also
http://groups.google.be/group/comp.soft-sys.math.maple/browse_thread/thread/b3710ca0dc842857/6aeeadd1f4eb2172?hl=nl&lnk=st&q=#6aeeadd1f4eb2172

I'm trying to understand their strategy and convert it to Maxima, but I haven't
succeeded yet...

Regards,
Bart

-- 
	"Share what you know.  Learn what you don't."