# [Maxima] integral

Bart Vandewoestyne Bart.Vandewoestyne at telenet.be
Mon Apr 7 16:28:34 CDT 2008

```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:

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."
```