Opened 12 years ago
Closed 9 years ago
#8499 closed enhancement (fixed)
improve documentation of partial_fraction_decomposition
Reported by: | zimmerma | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-6.2 |
Component: | calculus | Keywords: | |
Cc: | Merged in: | ||
Authors: | Luis Felipe Tabera Alonso | Reviewers: | Luis Felipe Tabera Alonso, Paul Zimmermann |
Report Upstream: | N/A | Work issues: | |
Branch: | u/lftabera/8499_doc_fracdec (Commits, GitHub, GitLab) | Commit: | d7b561af265afe6df74f292b6cc50e8bec2d6fe3 |
Dependencies: | Stopgaps: |
Description (last modified by )
How can one compute a partial fraction decomposition over the complex numbers? Consider the following:
sage: x = PolynomialRing(RationalField(), 'x').gen() sage: r = 1 /(x^4 + 1) sage: r.partial_fraction_decomposition() (0, [1/(x^4 + 1)])
This is ok since we explicitely work over QQ. Now compare with:
sage: P.<y> = PolynomialRing(RationalField()) sage: Qbar.<y> = QuotientRing(P, y^2+1) sage: x = PolynomialRing(Qbar, 'x').gen() sage: r = 1 /(x^4 + 1) sage: r.partial_fraction_decomposition() --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last)
apply trac_8499.patch
Attachments (1)
Change History (13)
comment:1 Changed 9 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:2 Changed 9 years ago by
Changed 9 years ago by
comment:3 Changed 9 years ago by
- Description modified (diff)
- Status changed from new to needs_review
- Summary changed from partial_fraction_decomposition does not work over algebraic extensions to improve documentation of partial_fraction_decomposition
I've changed the ticket summary, and attached a patch (against Sage 5.9) which improves the documentation of partial_fraction_decomposition
.
Paul
comment:4 Changed 9 years ago by
- Type changed from defect to enhancement
comment:5 Changed 9 years ago by
- Status changed from needs_review to needs_info
Looks good, but I have a question. How is computing the rational fraction decomposition over QQbar gives you the extension where the denominator splits? It just returns the full decomposition over QQbar no more no less. The extension would be in any case the splitting field of the denominator, isn't it?
I would expect something like "Now if you want Sage to compute an extension where the denominator fully factors, use QQbar: "
comment:6 Changed 9 years ago by
thank you for your feedback. You have two questions in fact:
How is computing the rational fraction decomposition over QQbar gives you the extension where the denominator splits?
this is given in the denominators of the output.
The extension would be in any case the splitting field of the denominator, isn't it?
yes.
Feel free to propose a reviewer patch!
Paul
comment:7 Changed 9 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:8 Changed 9 years ago by
- Branch set to u/lftabera/8499_doc_fracdec
- Commit set to d7b561af265afe6df74f292b6cc50e8bec2d6fe3
- Reviewers set to Luis Felipe Tabera Alonso
- Status changed from needs_info to needs_review
My complain is that using QQbar does not give you the splitting field of the denominator in an obvious way. I have changed the documentation accordingly. Paul, could you take a look at my changes and check if you agree with them?
Luis
comment:9 Changed 9 years ago by
I get an error when I try this example:
sage: R.<x> = QQ[] sage: r = 1/(x^4+2) sage: N = r.denominator().splitting_field('a') --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-c9d534f911a3> in <module>() ----> 1 N = r.denominator().splitting_field('a') /usr/local/sage-6.0-x86_64-Linux/local/lib/python2.7/site-packages/sage/structure/element.so in sage.structure.element.Element.__getattr__ (sage/structure/element.c:3873)() /usr/local/sage-6.0-x86_64-Linux/local/lib/python2.7/site-packages/sage/structure/misc.so in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1696)() AttributeError: 'sage.rings.polynomial.polynomial_rational_flint.Polynomial_rational_flint' object has no attribute 'splitting_field'
comment:10 Changed 9 years ago by
Sorry for not telling, you need sage 6.1 released today...
comment:11 Changed 9 years ago by
- Reviewers changed from Luis Felipe Tabera Alonso to Luis Felipe Tabera Alonso, Paul Zimmermann
- Status changed from needs_review to positive_review
I tried the added examples with Sage 6.1 and they work, thus positive review for me.
comment:12 Changed 9 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
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)]
orQQ[sqrt(-1)]
:or:
Now if you want Sage to automatically find the extension where the denominator fully factors, use
QQbar
:I'll add some examples to the documentation and then we can close this ticket.
Paul