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

Check for and handle symbolic series in simplify #19998

Open
dkrenn opened this issue Feb 1, 2016 · 2 comments
Open

Check for and handle symbolic series in simplify #19998

dkrenn opened this issue Feb 1, 2016 · 2 comments

Comments

@dkrenn
Copy link
Contributor

dkrenn commented Feb 1, 2016

sage: (x+1).series(x,2)
1 + 1*x
sage: (x+1).series(x,2).operator() is None
True
sage: (x+1).series(x,2).operands()
[1, x]

Related (maybe a consequence) is

sage: (x+1).series(x,2) - 1
(1 + 1*x) - 1
sage: ((x+1).series(x,2) - 1).simplify()
...
ValueError: The name "1" is not a valid Python identifier.

Component: symbolics

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

@dkrenn dkrenn added this to the sage-7.1 milestone Feb 1, 2016
@rwst
Copy link

rwst commented Feb 5, 2016

comment:1

It is both a consequence of the special status series have in GiNaC. As to the latter, the documentation notes you need to apply series again for getting results:

sage: (x+1).series(x,2)
1 + 1*x
sage: _-1
(1 + 1*x) - 1
sage: _.series(x,2)
1*x

@rwst
Copy link

rwst commented Aug 3, 2016

comment:2

The best way to give users what they want---apart from always automatically applying the series operator---would be to apply it in simplify() if the expression has a series, i.e., ((x+1).series(x,2) - 1).simplify() should give 1*x instead of an exception. This means that the operator to-be-applied should have as precision the min of all operators precisions in the expression.

@rwst rwst modified the milestones: sage-7.1, sage-7.4 Aug 3, 2016
@rwst rwst changed the title missing operator in symbolic series Check for and handle symbolic series in simplify Aug 3, 2016
@mkoeppe mkoeppe removed this from the sage-7.4 milestone Dec 29, 2022
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

3 participants