Hi:

My formula has a lot of square of half angle trigonometric functions. We 
all know that sin(x/2)**2=(1-cos(x))/2 and cos(x/2)**2=(1+cos(x))/2. But 
how to do that in sympy? I try trigsimp and expand_trig, both of them are 
not working.

import sympy
x=sympy.symbols('x',real=True)
sympy.expand_trig(sympy.cos(x/2)**2)
sympy.trigsimp(sympy.sin(x/2)**2)

output is the original half angle formula.

Is there any function like trigreduce in maxima? It does such job.

-- 
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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/1953bfce-3bdc-4cf8-8634-8e48a7812bf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to