Comment #2 on issue 3821 by smi...@gmail.com: trigsimp does not simplify
`cosh(z) - sinh(z)`
http://code.google.com/p/sympy/issues/detail?id=3821
trigsimp tries to work with trig functions, not exponentials.
foo.rewrite(exp) will give the desired result for all of these:
for foo in
[cos(x)+I*sin(x),cos(x)-I*sin(x),cosh(x)-sinh(x),cosh(x)+sinh(x)]:
... foo.rewrite(exp)
...
exp(I*x)
exp(-I*x)
exp(-x)
exp(x)
I'm tempted to say that this shouldn't be part of trigsimp. Perhaps part of
simplify?
from sympy.simplify.simplify import _trigs
expr
cos(I*sin(x) + cos(x)) + 2
fil = lambda x: x.is_Add and x.has(*_trigs)
act = min(x, expand_mul(x.rewrite(exp)), key=count_ops)
expr.replace(fil, act)
cos(exp(I*x)) + 2
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.