Ask Your Question
0

an integral with arccos wrong

asked 2017-10-10 22:15:46 +0100

lg gravatar image

updated 2023-01-09 23:59:44 +0100

tmonteil gravatar image

The value of the integral integrate(exp(arccos(x)),x,0,1) is badly return by Sage. However, sympy_integrator or giac_integrator give the exact value (and also the primitive), maxima giving the same wrong value than Sage (the both unable to give a primitive)

 sage: integrate(exp(arccos(x)),x,0,1)
-1/2*e^(-1/2*pi) + 1/2

Calculus gives through the change of variable x=cos t the equality

\int_0^1 exp(arccos(x))dx= \int_0^{pi/2}e^t sin(t)dt
and the second integral is easily computed :

sage: integrate(exp(t)*sin(t),t,0,pi/2)                          
1/2*e^(1/2*pi) + 1/2 


from sage.symbolic.integration.external import sympy_integrator
sympy_integrator(exp(arccos(x)), x, 0, 1)
1/2*e^(1/2*pi) + 1/2
# GOOD

from sage.symbolic.integration.external import maxima_integrator
maxima_integrator(exp(arccos(x)), x, 0, 1)
-1/2*e^(-1/2*pi) + 1/2
# BAD

from sage.symbolic.integration.external import giac_integrator
giac_integrator(exp(arccos(x)), x, 0, 1)
1/2*e^(1/2*pi) + 1/2
# GOOD
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-10-10 23:28:28 +0100

mforets gravatar image

updated 2017-10-11 07:57:12 +0100

actually when you do integrate(...), Maxima is used: there is no such "Sage integrator". this corresponds to what you observed.

the backend doing the symbolic integrator can be conveniently specified with the algorithm keyword, as in integrate(exp(arccos(x)),x,0,1, algorithm='giac'), etc.

there is a collection of integrals that are wrong in the symbolics wiki. it should be checked if yours is reported there (i didn't check yet), and if it isn't then a new ticket can be created, possibly with an upstream report (Maxima).

EDIT: i've added ticket #24008. thanks for reporting :)

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-10-10 22:15:46 +0100

Seen: 701 times

Last updated: Oct 11 '17