Trigsimp should do it. >>> trigsimp(sin(x)*cos(x)) sin(2*x)/2
On 11 July 2015 at 09:11, Pavel Grinfeld <[email protected]> wrote: > That's almost it! Thank you. > Could I have the answer as a trig polynomial, meaning sin(2a) instead of > sin(a)cos(a), etc. > > Thanks again. > > On Fri, Jul 10, 2015 at 11:36 PM, Sartaj Singh <[email protected]> > wrote: > >> 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 <[email protected]> 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 <[email protected]> >>>> 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 <[email protected]> >>>> 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 >>>> >> [email protected]. >>>> >> To post to this group, send email to [email protected]. >>>> >> 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 [email protected]. >>>> > To post to this group, send email to [email protected]. >>>> > 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 >>>> [email protected]. >>>> To post to this group, send email to [email protected]. >>>> 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 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 >> [email protected]. >> To post to this group, send email to [email protected]. >> 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 >> <https://groups.google.com/d/msgid/sympy/f4663cfa-5f3a-4a96-89a5-db71b41facff%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> 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 [email protected]. > To post to this group, send email to [email protected]. > 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_%3DSb1YbfzXz8eRq1xHN2Tit_73VrEVOtUVcTrYmqrFMu2g%40mail.gmail.com > <https://groups.google.com/d/msgid/sympy/CAAnX_%3DSb1YbfzXz8eRq1xHN2Tit_73VrEVOtUVcTrYmqrFMu2g%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Regards *Sartaj Singh* *Mathematics and Computing*, Indian Institute of Technology, Varanasi - 221 005 INDIA E-mail: [email protected], *[email protected] <[email protected]>* -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CAC%2BH8-FPY5ywP4mMp0JJvpY%2Btz4VS_qswKy8vpxvs5D%3DR-GTFA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
