Comment #1 on issue 3316 by [email protected]: Expr.expand: the result depends on the order in which hints are traversed.
http://code.google.com/p/sympy/issues/detail?id=3316

While there are some general principles that govern order, e.g. log > multinomial > mul (i.e. log should come first). But I'm not sure that a given order will always work to expand an expression fully. But with the recent changes that have been made to expand, I don't think it too unreasonable to just iterate over a given set of hints until there is no change in the expression. Order will still matter in the case of something like

x = symbols('x', positive=True)
expand_multinomial(log((x+1)**2))
log(x**2 + 2*x + 1)
expand(log((x+1)**2))
2*log(x + 1)

So I'm not sure there can be a better approach. There is not always a unique expansion.

--
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.

Reply via email to