Comment #10 on issue 2022 by smichr: inconsistent behaviour of subs when
using non-commutative symbols
http://code.google.com/p/sympy/issues/detail?id=2022
The case of replacing exp(x) with y in exp(rat*x) is not a problem since x
is extractable from rat*x and int*x. That's the beauty
of "extract_multiplicatively":
exp(3*x).extract_multiplicatively(exp(2*x))
exp(4*x).extract_multiplicatively(exp(2*x))
exp(2*x)
exp(4*x/3).extract_multiplicatively(exp(x))
exp(x/3)
(4*x/9).extract_multiplicatively(2*x/3)
2/3
{but exp(4*x/9).extract_multiplicatively(exp(2*x/3)) gives an error that I
have to look into since it should work.}
How one gets this behavior is an implementation detail. The problem
with "try use all the algebraic hints it can" is that you are getting away
from "explicit is better than implicit". The user should have to say
whether they want u-substitution (single symbol replaced with the
expression obtained by solving a key relationship between that symbol
and "u"), extractive substitution or exact substitution.
--
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.