Opened 7 years ago
Closed 7 years ago
#16197 closed enhancement (duplicate)
provide missing function expansions of power series
Reported by: | rws | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | calculus | Keywords: | function, series expansion |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Some functions do not support rings/power-series*:
sage: R.<x> = PowerSeriesRing(ZZ) sage: sqrt(1-4*x^2) 1 - 2*x^2 - 2*x^4 - 4*x^6 - 10*x^8 - 28*x^10 - 84*x^12 - 264*x^14 - 858*x^16 - 2860*x^18 + O(x^20) sage: sin(1+4*x^2) ... TypeError: cannot coerce arguments: no canonical coercion from Power Series Ring in x over Integer Ring to Symbolic Ring
What is missing:
acos
,acosh
,asin
,asinh
,atan
,atanh
,cos
,cosh
,cotanh
,dilog
,gamma
,intformal
,lngamma
,psi
,sin
,sinh
,tan
,tanh
Change History (11)
comment:1 Changed 7 years ago by
comment:2 follow-up: ↓ 3 Changed 7 years ago by
Pari's symblic is not up to this. I'd consider it a bug that there is no default precision to SR series results (like with PowerSeries
), so yes, if your last example would work without the 16
this ticket would rather be about my example sin(1+4*x^2)
---it should simply work like series()
and give back one instead of SR.
The rest of the ticket concerns possibly missing functions and I will move this to another ticket.
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 7 years ago by
Pari's symblic is not up to this. I'd consider it a bug that there is no default precision to SR series results (like with
PowerSeries
), so yes, if your last example would work without the16
this ticket would rather be about my examplesin(1+4*x^2)
---it should simply work likeseries()
and give back one instead of SR.
Hmm, that's an interesting suggestion. One could imagine it's a bug the other way around, but I have no vested interest in this - I think a default for either one could be useful, in principle, and (importantly) wouldn't be backward-incompatible. But what would the default be? It's hard to imagine one non-arbitrary... hmm. What do Mathematica and/or Maple and/or Magma do with this? If there is a standard one could use that.
comment:4 in reply to: ↑ 3 Changed 7 years ago by
- Description modified (diff)
- Summary changed from provide function expansions of power series (from Pari) to provide missing function expansions of power series
I wrote earlier:
The rest of the ticket concerns possibly missing functions and I will move this to another ticket.
Nothing missing there except the a.g.m., fortunately.
Replying to kcrisman:
Hmm, that's an interesting suggestion. One could imagine it's a bug the other way around, but I have no vested interest in this - I think a default for either one could be useful, in principle, and (importantly) wouldn't be backward-incompatible. But what would the default be? It's hard to imagine one non-arbitrary... hmm.
This is now #16201
What do Mathematica and/or Maple and/or Magma do with this? If there is a standard one could use that.
If I ask for "cosine power series" in Wolfram Alpha I get 1-x^2/2+x^4/24-x^6/720+O(x^7)
comment:5 Changed 7 years ago by
Edit: my copy of another comment was unrelated so I deleted it
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-duplicate/invalid/wontfix
- Status changed from new to needs_review
Closing as wontfix since all issues mentioned have their own tickets.
comment:8 Changed 7 years ago by
I only see one ticket mentioned. Just for completeness, can you mention them (if there are others)?
comment:9 Changed 7 years ago by
comment:10 Changed 7 years ago by
- Status changed from needs_review to positive_review
comment:11 Changed 7 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
Similarly to my other comment on this, I don't know if we want
n(pi/4)
in here or not...Also, the regular
SR
one works fine:so I'm not sure why you referenced it, though I agree that the error you get for power series rings is not ideal. Is there a way to either use SR for this (perhaps not "correct" for power series rings though?) or to get Pari to return a symbolic constant term?
What if the coefficients weren't rationals? Or integers? Note that in your example there is a 16/3 coefficient, which presumably isn't in the power series ring over integers. These may be dumb questions, but I'm just trying to explore what is really the desired behavior - certainly wrapping more Pari stuff is not a bad idea!