Ask Your Question


asked 2015-04-26 12:06:05 -0500

Vangelis gravatar image

this is for sure 2, however it evaluates to -1 !!! Is there anything wrong with the statement itself? Any suggestion?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-26 14:48:57 -0500

calc314 gravatar image

It is my understanding that Maxima has a difficult time with absolute values in integrals. You can get the answer using a numerical approximation via:


Or via sympy you can use:

import sympy
print sympy.integrals.integrate(abs(cos(x)),(x,0,pi)).n()
edit flag offensive delete link more



Both of your suggestions work!!!

Vangelis gravatar imageVangelis ( 2015-04-26 16:35:43 -0500 )edit

@Vangelis: you can mark the answer as accepted: click the check mark on the left.

slelievre gravatar imageslelievre ( 2015-04-26 21:16:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2015-04-26 12:06:05 -0500

Seen: 476 times

Last updated: Apr 26 '15