#16240: regression in partial_fraction_decomposition()
--------------------------------------------------+------------------------
       Reporter:  rws                             |        Owner:
           Type:  defect                          |       Status:  new
       Priority:  major                           |    Milestone:  sage-6.3
      Component:  commutative algebra             |   Resolution:
       Keywords:  partial fractions, polynomials  |    Merged in:
        Authors:                                  |    Reviewers:
Report Upstream:  N/A                             |  Work issues:
         Branch:                                  |       Commit:
   Dependencies:                                  |     Stopgaps:
--------------------------------------------------+------------------------
Description changed by rws:

Old description:

> Note the sign of the denominator:
> {{{
> sage: R.<x> = ZZ['x']
> sage: p=(6*x^2 - 9*x + 5)/(-x^3 + 3*x^2 - 3*x + 1)
> sage: p.partial_fraction_decomposition()
> (0, [6/(x - 1), 3/(x^2 - 2*x + 1), 2/(x^3 - 3*x^2 + 3*x - 1)])
> sage: 6/(x - 1) + 3/(x^2 - 2*x + 1) + 2/(x^3 - 3*x^2 + 3*x - 1)
> (6*x^2 - 9*x + 5)/(x^3 - 3*x^2 + 3*x - 1)
> }}}
> while in SR:
> {{{
> sage: var('x')
> x
> sage: p=(6*x^2 - 9*x + 5)/(-x^3 + 3*x^2 - 3*x + 1)
> sage: p.partial_fraction()
> -6/(x - 1) - 3/(x - 1)^2 - 2/(x - 1)^3
> }}}
> The minimal case, showing with odd exponents:
> {{{
> sage: R.<x> = ZZ['x']
> sage: p=1/(-x + 1)
> sage: p.partial_fraction_decomposition()
> (0, [1/(x - 1)])
> }}}

New description:

 This worked in 6.1.1. Maybe triggered in #15306.
 Note the sign of the denominator:
 {{{
 sage: R.<x> = ZZ['x']
 sage: p=(6*x^2 - 9*x + 5)/(-x^3 + 3*x^2 - 3*x + 1)
 sage: p.partial_fraction_decomposition()
 (0, [6/(x - 1), 3/(x^2 - 2*x + 1), 2/(x^3 - 3*x^2 + 3*x - 1)])
 sage: 6/(x - 1) + 3/(x^2 - 2*x + 1) + 2/(x^3 - 3*x^2 + 3*x - 1)
 (6*x^2 - 9*x + 5)/(x^3 - 3*x^2 + 3*x - 1)
 }}}
 while in SR:
 {{{
 sage: var('x')
 x
 sage: p=(6*x^2 - 9*x + 5)/(-x^3 + 3*x^2 - 3*x + 1)
 sage: p.partial_fraction()
 -6/(x - 1) - 3/(x - 1)^2 - 2/(x - 1)^3
 }}}
 The minimal case, showing with odd exponents:
 {{{
 sage: R.<x> = ZZ['x']
 sage: p=1/(-x + 1)
 sage: p.partial_fraction_decomposition()
 (0, [1/(x - 1)])
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/16240#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to