integral



 I think your function
 abs(2*x*sin(x)-cos(1/x))
 is indefinite at x=0, isn't it?
 If so, I think you should in principle try something like
limit(integrate(abs(2*x*sin(x)-cos(1/x)),x,y,2/%pi),y,0).
  Perhaps the 'quad_qag' function suits your problem.

 ~Shahir
------- Original Message -------
From: Bart Vandewoestyne <Bart.Vandewoestyne at telenet.be>
To: maxima at math.utexas.edu
Sent: 08/04/08, 01:58:34
Subject: integral

Dear list,

I would like to obtain a numerical value for the variation of the
third function at

http://en.wikipedia.org/wiki/Bounded_variation#Examples

namely, the one with x^2*sin(1/x).

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);
                           2
                          ---
                          %pi
                         /
                         [    !                 1 !
(%o8)                    I    !2 x sin(x) - cos(-)! dx
                         ]    !                 x !
                         /
                          0

However, maxima refuses to compute it.

I have asked this question also on comp.soft-sys.math.maple and the
strategy proposed there is to integrate between the zeros of
2*x*sin(x)-cos(1/x) and then sum all these values:

http://groups.google.be/group/comp.soft-sys.math.maple/browse_thread/thread/b3710ca0dc842857/6aeeadd1f4eb2172?hl=nl&lnk=st&q=integral+group%3Acomp.soft-sys.math.maple+author%3AVandewoestyne#6aeeadd1f4eb2172

Somebody in that thread even proposed an approximation for the zeros, which
can then be used as starting points for Newton rootfinding.

As I'm not yet too familiar with Maxima, I wasn't however able to translate
the code snippets given there into Maxima yet... and sometimes it's hard
to find in the reference manual how to do certain things...

Can anybody help me in finding this integral, possibly translating the
code snippets from the previously mentioned thread into Maxima?

I really would like to do this using Open Source Software...

Thanks,
Bart

-- 
	"Share what you know.  Learn what you don't."
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima