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 ]
 James H. Cloos Jr. Posts: 4 Registered: 12/12/04
Re: Numerical integration with maxima
Posted: Nov 6, 2012 1:54 PM

>>>>> "C" == Claude <claude@nospam.invalid> writes:

Just a couple of notes:

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

Use either:

f:abs(sin(x));

or:

f(x):=abs(sin(x));

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

Use 2*%pi.

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

More importantly, integrate() is for symbolic integration. For
numerical integration use quad_qag() and the related functions.

Try:

for a 2nd order approximation. I get the result:

[4.0, 4.440892098500626e-14, 63, 0]

the values in the list are theapproximation, the approx error, the
number of evaluations and an error code. 0 means no error. So the
result is 4.0 +- 4.440892098500626e-14.

Try:

and:

in maxima.

-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6

Date Subject Author
11/6/12 Claude
11/6/12 Nasser Abbasi
11/6/12 James H. Cloos Jr.
11/7/12 Claude
11/6/12 Richard Fateman