Skip to content

advanced symbolic series of Order any expression #19997

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

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

advanced symbolic series of Order any expression #19997

dkrenn opened this issue Feb 1, 2016 · 3 comments

Comments

@dkrenn
Copy link
Contributor

dkrenn commented Feb 1, 2016

sage: (x+1).sqrt().series(x,3)
1 + 1/2*x + (-1/8)*x^2 + Order(x^3)
sage: (x+1).sqrt().series(x,3).subs(x=1/x)
1/2/x - 1/8/x^2 + 1

Component: symbolics

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

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

rwst commented Feb 5, 2016

comment:1

The substitution is fine. To support other than power series would be a major enhancement.

@rwst rwst changed the title substitution in symbolic series: losing Order advanced symbolic series of Order any expression Feb 5, 2016
@rwst rwst added t: enhancement and removed t: bug labels Feb 5, 2016
@dkrenn
Copy link
Contributor Author

dkrenn commented Feb 8, 2016

comment:2

Replying to @rwst:

The substitution is fine. To support other than power series would be a major enhancement.

I'm not sure if I understand your comment. What I see (as someone having only little idea how power series are done in SR) is that in

sage: a = 1 + x/2 - x^2/8 + (x^3).Order()
sage: a
-1/8*x^2 + 1/2*x + Order(x^3) + 1
sage: a.subs(x=1/x)
1/2/x - 1/8/x^2 + Order(x^(-3)) + 1

substitution works (somehow at least), but in the example stated in the ticket not, the O-Term disappears.

@rwst
Copy link
Contributor

rwst commented Feb 9, 2016

comment:3

So, until that enhancement is implemented, a second ticket is needed for consistency, which throws an error. But note that the user won't even encounter this inconsistency if she creates symbolic series the way the documentation suggests it:

sage: (1/(1-x)).series(x,2)
1 + 1*x + Order(x^2)
sage: s=_
sage: s.subs(x==sin(x))
sin(x) + 1
sage: s.subs(x==exp(x))
e^x + 1
sage: s.subs(x==1/x)
1/x + 1
sage: s.subs(x=1/x)
1/x + 1

@mkoeppe mkoeppe removed this from the sage-7.1 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