Updates:
Status: Accepted
Labels: Polynomial Simplify
Comment #1 on issue 2548 by asmeurer: Partial fraction decomposition with
linear denominators
http://code.google.com/p/sympy/issues/detail?id=2548
First off, you have to call apart(full=True) to actually get what you want
(by the way, this needs to be added to the docstring of apart(), since the
threaded decorator destroys the signature).
That algorithm creates RootSum(x**2 + 1, Lambda(a, -a/(2*(x - a)))), but
the RootSum instantly collapses that into 1/(x**2 + 1). Sending auto=False
to RootSum does not affect this (what does that option even do?)
I think RootSum should have two additional options. First, it needs an
evaluate flag, that acts like it does everywhere else, i.e., does not do
*any* automatic evaluation, but just does a fast exit with what is entered.
Second, it needs some kind of as_add (better name?) option, which would
return an Add over all roots (using RootOf if necessary). In other words,
RootSum(x**2 + 1, Lambda(a, -a/(2*(x - a))), as_add=True) would return
-I/(2*(x - I)) + I/(2*(x + I)) instead of 1/(x**2 + 1).
apart(full=True) should call either evaluate=False or this. Or maybe it
should return a hybrid version where the terms that would use RootOf are
kept in a RootSum, but the rest are pulled out. Perhaps the best way would
be to add options to apart() (and corresponding options to RootSum) to
control to what degree it tries to give a sum of terms with linear
denominators.
--
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.