#8499: partial_fraction_decomposition does not work over algebraic extensions
----------------------------+-------------------------
       Reporter:  zimmerma  |        Owner:  burcin
           Type:  defect    |       Status:  new
       Priority:  major     |    Milestone:  sage-5.12
      Component:  calculus  |   Resolution:
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+-------------------------

Comment (by zimmerma):

 I found out the solution by myself. If one wants say a decomposition over
 Q[sqrt(2)] or Q[I], then simply use {{{QQ[sqrt(2)]}}} or
 {{{QQ[sqrt(-1)]}}}:
 {{{
 sage: R.<x> = QQ[sqrt(2)][]
 sage: r=1/(x^4+1)
 sage: r.partial_fraction_decomposition()
 (0,
  [(-1/4*sqrt2*x + 1/2)/(x^2 - sqrt2*x + 1),
   (1/4*sqrt2*x + 1/2)/(x^2 + sqrt2*x + 1)])
 }}}
 or:
 {{{
 sage: R.<x> = QQ[sqrt(-1)][]
 sage: r=1/(x^4+1)
 sage: r.partial_fraction_decomposition()
 (0, [(-1/2*I)/(x^2 - I), 1/2*I/(x^2 + I)])
 }}}
 Now if you want Sage to automatically find the extension where the
 denominator fully factors, use
 {{{QQbar}}}:
 {{{
 sage: R.<x> = QQbar[]
 sage: r=1/(x^4+1)
 sage: r.partial_fraction_decomposition()
 (0,
  [([-0.17677669529663690 .. -0.17677669529663686] - [0.17677669529663686
 .. 0.17677669529663690]*I)/(x + [-0.70710678118654758 ..
 -0.70710678118654746] - [0.70710678118654746 .. 0.70710678118654758]*I),
   ([-0.17677669529663690 .. -0.17677669529663686] + [0.17677669529663686
 .. 0.17677669529663690]*I)/(x + [-0.70710678118654758 ..
 -0.70710678118654746] + [0.70710678118654746 .. 0.70710678118654758]*I),
   ([0.17677669529663686 .. 0.17677669529663690] - [0.17677669529663686 ..
 0.17677669529663690]*I)/(x + [0.70710678118654746 .. 0.70710678118654758]
 - [0.70710678118654746 .. 0.70710678118654758]*I),
   ([0.17677669529663686 .. 0.17677669529663690] + [0.17677669529663686 ..
 0.17677669529663690]*I)/(x + [0.70710678118654746 .. 0.70710678118654758]
 + [0.70710678118654746 .. 0.70710678118654758]*I)])
 }}}
 I'll add some examples to the documentation and then we can close this
 ticket.

 Paul

--
Ticket URL: <http://trac.sagemath.org/ticket/8499#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/groups/opt_out.

Reply via email to