Opened 5 years ago
Last modified 5 years ago
#19997 new enhancement
advanced symbolic series of Order any expression
Reported by: | dkrenn | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.1 |
Component: | symbolics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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
Change History (3)
comment:1 follow-up: ↓ 2 Changed 5 years ago by
- Summary changed from substitution in symbolic series: losing Order to advanced symbolic series of Order any expression
- Type changed from defect to enhancement
comment:2 in reply to: ↑ 1 Changed 5 years ago by
Replying to rws:
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.
comment:3 Changed 5 years ago by
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
The substitution is fine. To support other than power series would be a major enhancement.