You should do this. >>> ((2+2*I)*exp(I*x) + (2-2*I)*exp(-I*x)).rewrite(sin).expand(sin,trig=True ) -4*sin(x) +4*cos(x)
On Saturday, 11 July 2015 08:50:00 UTC+5:30, PG wrote: > > I do not believe that is the case: > > >>> expand((2+3*I)*exp(2*I) + (2-3*I)*exp(-2*I), sin, trig=True) > 2*exp(-2*I) + 3*I*exp(2*I) - 3*I*exp(-2*I) + 2*exp(2*I) > > On Fri, Jul 10, 2015 at 6:51 PM, Aaron Meurer <asme...@gmail.com > <javascript:>> wrote: > >> If you use expand(trig=True) on the expression it will expand the >> trigonometric functions. >> >> Aaron Meurer >> >> On Fri, Jul 10, 2015 at 4:02 PM, Pavel Grinfeld <pgei...@gmail.com >> <javascript:>> wrote: >> > Yes, you are right, I think I mistyped the original question. So let me >> try >> > to save it from here: is there a way to get the answer as a linear >> > combination of sin and cos? >> > >> > >> > >> > On Fri, Jul 10, 2015 at 3:50 PM, Gaurav Dhingra <axyd...@gmail.com >> <javascript:>> wrote: >> >> >> >> 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 <javascript:>. >> >> To post to this group, send email to sy...@googlegroups.com >> <javascript:>. >> >> 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 >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "sympy" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to sympy+un...@googlegroups.com <javascript:>. >> > To post to this group, send email to sy...@googlegroups.com >> <javascript:>. >> > 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/CAAnX_%3DR5%3DK%2B3huAvkPDy87Qc%2BOD3DeG4RjoFD%3DkR%2B4rLi6TxNQ%40mail.gmail.com >> . >> > >> > For more options, visit https://groups.google.com/d/optout. >> >> -- >> 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 <javascript:>. >> To post to this group, send email to sy...@googlegroups.com <javascript:> >> . >> 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/CAKgW%3D6KbffK-PQ%3DaadafNPmEg%3D8Tbc5KC92icL2-gN79AgG4PA%40mail.gmail.com >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@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/f4663cfa-5f3a-4a96-89a5-db71b41facff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.