Though you should what output you expect(that helps the answerer). Assuming you expect solution in terms of `sin` or `cos` or some trigonometry. You can fo this:
```
>>> expr = (2+2*I)*exp(I*a) - (2-2*I)*exp(-I*a)
>>> simplify(expr.rewrite(sin))
4*sqrt(2)*I*sin(a+pi/4)
```
Cheers
Gaurav
Gaurav
--
You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/tDzSVoYz2m8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/dc71e2c2-49fb-4b2d-ad49-696c70d72101%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Since the real part is zero in this case. Hence only imaginary part is there, which I guess is given correctly. In the answer.
Isn't it ?
--
You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/tDzSVoYz2m8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/229ea500-c221-4ccc-b464-19c90bd6a511%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6KbffK-PQ%3DaadafNPmEg%3D8Tbc5KC92icL2-gN79AgG4PA%40mail.gmail.com.
>>> ((2+2*I)*exp(I*x) + (2-2*I)*exp(-I*x)).rewrite(sin).expand(sin,trig=True)
-4*sin(x) +4*cos(x)
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/f4663cfa-5f3a-4a96-89a5-db71b41facff%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAAnX_%3DSb1YbfzXz8eRq1xHN2Tit_73VrEVOtUVcTrYmqrFMu2g%40mail.gmail.com.