Here's a slight variation on the sympy tutorial examples that gives an
error:

In [1]: f = 1/x + 1/y + 1/z

In [2]: f.together()
Out[2]:
x⋅y + x⋅z + y⋅z
───────────────
     x⋅y⋅z

In [3]: f.together().apart()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call
last)
/home/jlh/<ipython-input-3-079c454de460> in <module>()
----> 1 f.together().apart()

...
NotImplementedError: multivariate partial fraction decomposition

In [4]:


Note that in this case a simple 'apart' function can be made from

 num,den = f.together().as_numer_denom()
 sum([n/den for n in num.as_ordered_terms()])

but there should be a general multivariate inverse to 'together'.  I
don't see an issue for this problem yet but I'm happy to make one.
There's already a 'partial_fraction()' method in Sage that works with
many variables (you can give a string of vars as an argument, as in
"f.partial_fraction('xyz')"), and it makes sense to offer both 'apart'
and 'together' in any cases where you offer one of them.  Especially,
in the tutorial, there is an immediate one variable example of the
inverse of 'apart' and 'together', and then an example of multivariate
'together', after which one naturally tries the multivariate 'apart'
and gets the NotImplementedError.

Has anyone started work on such a decomposition function?

John Hoebing

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to