Opened 8 years ago
Last modified 5 years ago
#14693 needs_info defect
Conversion of power series to symbolic ring
Reported by: | eviatarbach | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | symbolics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Converting a power series to the symbolic ring doesn't work as expected:
sage: R.<t> = PowerSeriesRing(QQ) sage: p = R([1,2,3]) sage: SR(p).variables() () sage: diff(SR(p)) 0
Perhaps it could be converted to a polynomial first and then converted to the symbolic ring?
sage: SR(p.polynomial()).variables() (t,) sage: diff(SR(p.polynomial())) 6*t + 2
Or maybe just raise an error (as per #13360)?
Change History (8)
comment:1 Changed 8 years ago by
- Description modified (diff)
comment:2 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 7 years ago by
comment:5 Changed 7 years ago by
- Description modified (diff)
- Summary changed from Coercion of power series to symbolic ring to Conversion of power series to symbolic ring
The examples here refer to conversion; not coercion. That fact that power series over "basic" ring types such as rationals or integers don't convert into SR is, I think, a shortcoming that can be fixed. The main thing is to find how to represent the relevant "big-Oh" in SR. Maxima does have power series, so there is at least one back-end that provides some support: http://maxima.sourceforge.net/docs/manual/en/maxima_28.html#IDX1221. Linking up maxima's internal format with sage might need some work:
sage: F=maxima_calculus('taylor(sin(x),x,0,3)') sage: F x-x^3/6 sage: F.ecl() <ECL: ((MRAT SIMP (((%SIN SIMP) $X) $X) (#:|sin(x)2136| #:X2137) (($X ((3 . 1)) 0 NIL #:X2137 . 2)) TRUNC) PS (#:X2137 . 2) ((3 . 1)) ((1 . 1) 1 . 1) ((3 . 1) -1 . 6))> sage: F-x+x^3/6 +0 sage: (F-x+x^3/6).ecl() <ECL: ((MRAT SIMP ($X) (#:X2145) (($X ((3 . 1)) 0 NIL #:X2145 . 1)) TRUNC) 0 . 1)>
(in maxima this prints with dots, so it knows it's a power series)
comment:6 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
#15707 is related.