I am running equations through the calculus meat grinder that is SymPy, and 
I am getting lots of these expressions in my (extremely verbose) results:

sin(a)*cos(b) - sin(b)*cos(a)

of course there is a trigonometric identity that this ought to simplify to, 
which is

sin(a-b) = sin(a)*cos(b) - sin(b)*cos(a)

but unfortunately sympy.simplify() does not seem to know about this.

This can be verified like so:

from sympy import *
a,b = symbols('a b')
f = sin(a-b)
f_expanded = expand(f,trig=True)
print f
print f_expanded
f_recovered = simplify(f_expanded)
print f_recovered # no joy

Any ideas on how to automate this simplification? I could go through by 
hand but then the whole point is to use SymPy to do this for me (and avoid 
pilot error) ...

Thanks for any suggestions,

-Paul


-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/-DMJeioa7X0J.
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?hl=en.

Reply via email to