Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium WrongResult
New issue 2549 by [email protected]: as_independent gives incorrect output
for some functions of non commutative symbols
http://code.google.com/p/sympy/issues/detail?id=2549
Best illustrated with examples
x,y = symbols('x,y')
n = symbols('n', commutative = False)
f = (x-n)*(x-y)
f.as_independent(x)
(x - n, x - y)
g = DiracDelta(x-n)*DiracDelta(x-y)
g.as_independent(x)
(DiracDelta(x - n), DiracDelta(x - y))
It seems that if the variable we wish to separate out is in an expression
with a non-commutative symbol, then that term is treated as independent
even though it clearly depends on the variable.
Because as_independent is used by integration, this means that functions
which should be integrated over are treated as coefficients just because
they contain non-commutative symbols. This should definitely be fixed.
Curiously, simpler cases where the non-commutative symbol is in a mul on
its own work fine.
f = x*y*n
f.as_independent(x)
(y * n, x)
--
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.