Comment #21 on issue 111 by [email protected]: Simplification of trig expressions
http://code.google.com/p/sympy/issues/detail?id=111

I tried to simplify a trigonometric function by the addition theorem with trigsimp():

import sympy
from sympy import cos, sin
from sympy.abc import x,y
e = cos(x) * sin(y) + sin(x) * cos(y)
print sympy.trigsimp(e1)
sin(x)*cos(y) + sin(y)*cos(x)

but it did not work. So I digged in the code and found the according rewrite rule in _trigsimp():
(a*sin(b + c), a*(sin(b)*cos(c) + sin(c)*cos(b)))
But I also found out, that this rule is written in the wrong order to apply the addition theorem and that even when it would be reversed, it would never be applied, since the rules are checked for each addition term separately.

I'm not sure, whether this can be fixed without breaking anything else. Maybe the best solution would be to implement a trig_reduce() function, like it was proposed in another bug report? Feels anybody responsible for trigsimp() or is anybody working on this right now?

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to