Here is an example of problem, the program is self-explanatory:
from sympy import Symbol,cos,sqrt,simplify,cosh
m=Symbol("m",positive=True)
e=Symbol("e",real=True,negative=False)
a1=4*cos(e)**2-4*cos(e)**4-1+4*(cos(e)-cosh(m))**2+cos(2*e)**2
b1=4*(cos(e)-cosh(m))**2
print simplify(a1)-b1 # a1 is equal to b1, so the result is zero
# however, the original version and the simplified version yield
# different results in the following two identical expressions
# the first result is wrong, it is not -2, but +2 because cosh(m) > cos(e),
# the second result is true
# it looks that sqrt(a1) results in 2*(cos(e)-cosh(m)), which is wrong,
# it must be 2*Abs(cos(e)-cosh(m))
print simplify(sqrt(a1)/(cosh(m)-cos(e)))
print simplify(sqrt(simplify(a1))/(cosh(m)-cos(e)))
"""
Python 2.7.8 (default, Sep 30 2014, 15:34:38) [GCC] on linux2
output:
0
-2
-2*Abs(cos(e) - cosh(m))/(cos(e) - cosh(m))
"""