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

2018-04-15 Thread Jeremie Knuesel
Hi, integrate(sin(x)*exp(I*x),x,-pi,0) returns 3/2*I*pi instead of 1/2*I*pi Is this a known issue? I couldn't find it reported elsewhere. Best regards, Jeremie Knuesel -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this gr

[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 Eric

[sage-devel] Problem of reduction of rational functions

2018-04-15 Thread dhr
Hi Reduction of rational functions seems not to work in specific cases. In the following output, === sage: R.=QQ[] sage: (2*t+2)/(2*t) (2*t + 2)/(2*t) sage: (2*t+2)/(2) t + 1 sage: (2*t^2+2*t)/(2*t) t + 1 === 2 is not reduced in the first calculation. SageMath ve

Re: [sage-devel] Problem of reduction of rational functions

2018-04-15 Thread Vincent Delecroix
The representation is indeed not canonical but the object compare coherently sage: R.=QQ[] sage: (2*t+2)/(2*t) (2*t + 2)/(2*t) sage: (2*t+2)/(2*t) == (t+1)/t True The reason is that 2 is a unit in QQ. You can compare with sage: R.=ZZ[] sage: (2*t+2)/(2*t) (t + 1)/t It would be nice to have bet

Re: [sage-devel] Problem of reduction of rational functions

2018-04-15 Thread Dima Pasechnik
On Sunday, April 15, 2018 at 9:27:40 PM UTC+1, vdelecroix wrote: > > The representation is indeed not canonical but the object compare > coherently > > sage: R.=QQ[] > sage: (2*t+2)/(2*t) > (2*t + 2)/(2*t) > sage: (2*t+2)/(2*t) == (t+1)/t > True > > The reason is that 2 is a unit in QQ. Yo

Re: [sage-devel] Problem of reduction of rational functions

2018-04-15 Thread Nils Bruin
On Sunday, April 15, 2018 at 3:53:08 PM UTC-7, Dima Pasechnik wrote: > > > It would be nice to have better simplification rules for QQ (and more >> generally fraction fields). >> > > I suppose it's only OK to have as an option, as in general computing such > a canonical > form would be slow, no?

Re: [sage-devel] Integrating SageMath into existing Python install / Python compiling error

2018-04-15 Thread Jordan Argyle
I'm so sorry I re-posted this error. It was the same original compile problem. Instead of using the normal compilers, it was pointing to the MOOSE compilers. So, commenting out the links to those compilers in .bashrc let the kernel connect just fine. The basic jist is, if you have different or

[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 s

[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 (