Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Simplify
New issue 3228 by asmeu...@gmail.com: powsimp(deep=True) should not use
expand
http://code.google.com/p/sympy/issues/detail?id=3228
In [583]: print e
sinh(mu*(-a + x))*sinh(mu*(b - y))/sinh(mu*(-a + b))
In [584]: (e - sinh(mu*(x - y))).rewrite(exp).cancel()
Out[584]:
2⋅b⋅μ -2⋅μ⋅y 2⋅μ⋅x -2⋅μ⋅y -2⋅a⋅μ 2⋅b⋅μ -2⋅a⋅μ 2⋅μ⋅x
- ℯ ⋅ℯ + ℯ ⋅ℯ + ℯ ⋅ℯ - ℯ ⋅ℯ
───────────────────────────────────────────────────────────────────
μ⋅x -μ⋅y -2⋅a⋅μ 2⋅b⋅μ μ⋅x -μ⋅y
- 2⋅ℯ ⋅ℯ + 2⋅ℯ ⋅ℯ ⋅ℯ ⋅ℯ
In [585]: (e - sinh(mu*(x - y))).rewrite(exp).cancel().powsimp()
Out[585]:
2⋅b⋅μ -2⋅μ⋅y 2⋅μ⋅x -2⋅μ⋅y -2⋅a⋅μ 2⋅b⋅μ -2⋅a⋅μ 2⋅μ⋅x
- ℯ ⋅ℯ + ℯ ⋅ℯ + ℯ ⋅ℯ - ℯ ⋅ℯ
───────────────────────────────────────────────────────────────────
μ⋅x -μ⋅y -2⋅a⋅μ 2⋅b⋅μ μ⋅x -μ⋅y
- 2⋅ℯ ⋅ℯ + 2⋅ℯ ⋅ℯ ⋅ℯ ⋅ℯ
In [586]: (e - sinh(mu*(x - y))).rewrite(exp).cancel().powsimp(deep=True)
Out[586]:
-2⋅a⋅μ + 2⋅b⋅μ -2⋅a⋅μ +
2⋅μ⋅x 2⋅b⋅μ - 2⋅μ⋅y
ℯ
ℯ ℯ
────────────────────────────────────────────── -
────────────────────────────────────────────── -
───────────────────────────────────────────
μ⋅x - μ⋅y -2⋅a⋅μ + 2⋅b⋅μ + μ⋅x - μ⋅y μ⋅x - μ⋅y -2⋅a⋅μ
+ 2⋅b⋅μ + μ⋅x - μ⋅y μ⋅x - μ⋅y -2⋅a⋅μ + 2⋅b⋅μ + μ⋅x -
- 2⋅ℯ + 2⋅ℯ - 2⋅ℯ +
2⋅ℯ - 2⋅ℯ + 2⋅ℯ
2⋅μ⋅x - 2⋅μ⋅y
ℯ
─── + ──────────────────────────────────────────────
μ⋅y μ⋅x - μ⋅y -2⋅a⋅μ + 2⋅b⋅μ + μ⋅x - μ⋅y
- 2⋅ℯ + 2⋅ℯ
But I just wanted the result from [585] with the exponents combined. And
if I try to put them back together using cancel, it expands the exponents
again! together() does the trick, but it shouldn't be that hard.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.