Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1964 by reni...@gmail.com: as_real_imag for Piecewise does not give correct answer
http://code.google.com/p/sympy/issues/detail?id=1964

For x a real Symbol

a = 2*I*(3*sin(4*x)-3*sin(4*x)*Piecewise((2.0, x<0), (1.0, 0 <= x)))

a.as_real_imag() =>

Re: -6*I(I*im(Piecewise(...))+re(Piecewise(...)))*sin(4*x)
Im: 6*sin(4*x)

It should be

Re:  6*sin(4*x)*im(Piecewise(...))
Im: -6*sin(4*x)*re(Piecewise(...))

I am using version 0.6.7 downloaded from the website on ubuntu 10.04 on amd64 if that is important.

Regards,

Renier

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to