In [15]: x, y, z = symbols('xyz', real=True)

In [16]: exp(I*x).expand(complex=True)
Out[16]: I*sin(x) + cos(x)

In [17]: re(_)
Out[17]: re(cos(x))

In [18]: im(__)
Out[18]: im(cos(x)) + sin(x)

Obviously the output should have been cos(x) and sin(x) respectively.

I created an issuse for this http://code.google.com/p/sympy/issues/detail?id=644

Adding simple _eval_is_real for cos, tan, cot, atan, acot works but
for asin and acos, the domain is [-1,1]. I am wondering if SymPy
currently features assumption to limit a variable's range just as we
can assume it to be real, so that a variable x can be defined as real
in the range [-1,1].
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to