Hello, Jeremy.
Try this:

from sympy.simplify.fu import TR7

TR7(cos(x)**2)



On Friday, March 27, 2015 at 8:36:43 PM UTC+2, Jeremy Holleman wrote:
>
> Hi,
>
> I'm relatively new to SymPy, and enjoying it so far.  I'm trying to 
> analyze the harmonics that result when a sinusoid goes through a non-linear 
> system.  I have an expression that includes powers of a cos() and I want to 
> expand it using the sum/difference angle identities.  So I want 
>
> In [5]: some_function(cos(x)**2)
> Out[5]: 1/2 + cos(2*x)
>
> But I'm getting 
> In [5]: expand_trig(cos(x)**2)
> Out[5]: cos(x)**2
>
> I've tried expand_trig(), trigsimp(), expand() (with several different 
> sets of hints), simplify(), and http://www.sympygamma.com/ and they all 
> just return the same expression that I've given them.  Any ideas would be 
> much appreciated.
>
> Thanks,
> Jeremy
>

-- 
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/4e65ad0a-9b10-42ca-9dae-8b8c45b98ab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to