Comment #11 on issue 2032 by [email protected]: Ability to work with K[x,
1/x] in Polys
http://code.google.com/p/sympy/issues/detail?id=2032
In followup to c6, there is an .as_independent(s) missing, I believe. Here
is a working routine:
>>> def apart_mv(eq):
... sep = []
... for s in eq.free_symbols:
... eq, d = apart(eq, s).as_independent(s, as_Add=True)
... if d:
... sep.append(d)
... if not sep:
... return eq
... sep.append(eq)
... return Add(*sep)
...
>>> apart_mv(eq)
c/(y + 1) + 3*x**2 + x + 1/y + 1/x + 1/c
>>> cancel(_)==eq
True
>>> eq
>>> eq
(c**2*x*y + 3*c*x**3*y**2 + 3*c*x**3*y + c*x**2*y**2 + c*x**2*y + c*x*y
+ c*x +
c*y**2 + c*y + x*y**2 + x*y)/(c*x*y**2 + c*x*y)
--
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.