Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Numerical integration with maxima
Replies: 4   Last Post: Nov 7, 2012 3:21 PM

 Messages: [ Previous | Next ]
 Claude Posts: 2 Registered: 11/6/12
Numerical integration with maxima
Posted: Nov 6, 2012 5:46 AM

I would like to numerically integrate the function abs(sin(x)) over the
domain 0 to 2*pi.

I've defined the function
f=abs(sin(x))

and then I called

integrate(f, x, 0, 2*pi)

But now I don't know how to numerically evaluate this integral.

Manually, it is easy to see that the result should be 4, but how to ask
maxima to compute this ?

Similarly, I cannot plot this function over the same domain. I've tried :

wxplot2d([abs(sin(x))], [x,0,6.28])\$

which gives the expected graph, but, if I replace the value 6.28 by 2*pi,
wxmaxima says that

plotting: range must be of the form [variable, min, max]; found: [x,0,2*pi]