[sage-devel] Re: Wrong result for definite integral of sin(x)*exp(I*x)

2018-04-20 Thread rjf
If Sage calls Maxima, then it is a bug in Sage also. Interestingly, Maxima gets the INdefinite integral correct. On Sunday, April 15, 2018 at 10:31:36 PM UTC-7, Ralf Stephan wrote: > > Not Sage, it's Maxima: > (%i2) integrate(sin(x)*exp(%i*x),x,-%pi,0); >

[sage-devel] Re: Wrong result for definite integral of sin(x)*exp(I*x)

2018-04-15 Thread 'Martin R' via sage-devel
FriCAS also would get it right, except that there is a bug in the interface, see https://trac.sagemath.org/ticket/25174 If someone can give me a hint on how to send %i instead of I for the imaginary unit to fricas, I'll fix it... (1) -> integrate(sin(x)*exp(%i*x),x=-%pi..0) %i %pi

[sage-devel] Re: Wrong result for definite integral of sin(x)*exp(I*x)

2018-04-15 Thread Ralf Stephan
Not Sage, it's Maxima: (%i2) integrate(sin(x)*exp(%i*x),x,-%pi,0); log(- 1) (%o2) + %i %pi 2 On Sunday, April 15, 2018 at 6:44:23 PM UTC+2, Eric Gourgoulhon wrote: > > Hi, > > Indeed, this

[sage-devel] Re: Wrong result for definite integral of sin(x)*exp(I*x)

2018-04-15 Thread Eric Gourgoulhon
Hi, Indeed, this seems a bug in Sage. Note that both SymPy and Giac return the correct answer: sage: integrate(sin(x)*exp(I*x), x, -pi, 0) 3/2*I*pi sage: integrate(sin(x)*exp(I*x), x, -pi, 0, algorithm='sympy') 1/2*I*pi sage: integrate(sin(x)*exp(I*x), x, -pi, 0, algorithm='giac') 1/2*I*pi