collect doesn't do expansion for you -- it just collects what is visible at
the topmost level of the expression tree so you have to do whatever level of
expansion is necessary:
>>> exp(x+y)+exp(x)
exp(x) + exp(x + y)
>>> collect(_,exp(x))
exp(x) + exp(x + y)
>>> collect(_.expand(),exp(x))
(exp(y) + 1)*exp(x)
--
You received this message because you are subscribed to the Google Groups
"sympy" 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?hl=en.