Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polynomials should support definite integration #22033

Open
jdemeyer opened this issue Dec 6, 2016 · 8 comments
Open

Polynomials should support definite integration #22033

jdemeyer opened this issue Dec 6, 2016 · 8 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Dec 6, 2016

Symbolic expressions support definite and indefinite integration:

sage: var('x')
x
sage: (x^3).integral(x)
1/4*x^4
sage: (x^3).integral(x, 0, 1)
1/4

Polynomials on the other hand support only indefinite integration:

sage: R.<x> = QQ[]
sage: (x^3).integral(x)
1/4*x^4
sage: (x^3).integral(x, 0, 1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-2a9c71b6b709> in <module>()
----> 1 (x**Integer(3)).integral(x, Integer(0), Integer(1))

/usr/local/src/sage-config/src/sage/rings/polynomial/polynomial_element.pyx in sage.rings.polynomial.polynomial_element.Polynomial.integral (build/cythonized/sage/rings/polynomial/polynomial_element.c:35807)()
   3361         return self._parent([n*coeffs[n] for n from 1 <= n <= degree])
   3362 
-> 3363     def integral(self,var=None):
   3364         """
   3365         Return the integral of this polynomial.

TypeError: integral() takes at most 1 positional argument (3 given)

Component: commutative algebra

Author: Frédéric Chapoton

Branch/Commit: u/chapoton/22033 @ 8254627

Issue created by migration from https://trac.sagemath.org/ticket/22033

@fchapoton
Copy link
Contributor

Commit: 2735f04

@fchapoton
Copy link
Contributor

Changed author from Jeroen Demeyer to Frédéric Chapoton

@fchapoton
Copy link
Contributor

New commits:

2735f04definite integral for polynomials

@fchapoton
Copy link
Contributor

Branch: u/chapoton/22033

@fchapoton
Copy link
Contributor

comment:3

one should be more careful in the substitution to handle multivariate polynomials too

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 10, 2022

Changed commit from 2735f04 to 8254627

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 10, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

8254627work in progress

@fchapoton
Copy link
Contributor

comment:5

there is another method "integral" for singular polynomials that needs the same treatment

@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants