ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 14 Nov 2011 14:50:54 -0600partial fraction decomposition function for multivariate rational expressionshttps://ask.sagemath.org/question/8429/partial-fraction-decomposition-function-for-multivariate-rational-expressions/Hi all:
I'd like to extend Sage's partial fraction decomposition function in the QuotientField class to a function that works on quotients of *multivariate* polynomials. To this end, i've found it convenient to store a rational expression $F = P/(Q_1^{e_1} \cdots Q_m^{e_m})$ as a Python list of the form [P,[Q_1,e_1],...,[Q_m,e_m]], where $Q_1,\ldots,Q_m$ are the irreducible factors of $F$'s denominator. Let's call these special kinds of lists 'widgets'. I have several auxiliary functions that manipulate widgets.
Code design questions for you. Should i make a new class for widgets, and if so, where in the Sage tree of modules should i put this class? If not, where do i put the auxiliary functions that manipulate widgets?
Thanks for your attention.
Alex Wed, 02 Nov 2011 13:11:23 -0500https://ask.sagemath.org/question/8429/partial-fraction-decomposition-function-for-multivariate-rational-expressions/Answer by niles for <p>Hi all:</p>
<p>I'd like to extend Sage's partial fraction decomposition function in the QuotientField class to a function that works on quotients of <em>multivariate</em> polynomials. To this end, i've found it convenient to store a rational expression $F = P/(Q_1^{e_1} \cdots Q_m^{e_m})$ as a Python list of the form [P,[Q_1,e_1],...,[Q_m,e_m]], where $Q_1,\ldots,Q_m$ are the irreducible factors of $F$'s denominator. Let's call these special kinds of lists 'widgets'. I have several auxiliary functions that manipulate widgets.</p>
<p>Code design questions for you. Should i make a new class for widgets, and if so, where in the Sage tree of modules should i put this class? If not, where do i put the auxiliary functions that manipulate widgets?</p>
<p>Thanks for your attention.</p>
<p>Alex </p>
https://ask.sagemath.org/question/8429/partial-fraction-decomposition-function-for-multivariate-rational-expressions/?answer=12903#post-id-12903Great!
My two cents: Yes, you should create a new class; and I would put it somewhere with the other multivariate polynomial modules. Once you have a reviewer for the ticket, they can tell you whether there's a good reason to put it somewhere else.
Mon, 14 Nov 2011 14:50:54 -0600https://ask.sagemath.org/question/8429/partial-fraction-decomposition-function-for-multivariate-rational-expressions/?answer=12903#post-id-12903