On Sunday, December 30, 2018 at 10:30:53 AM UTC-8, Peter Luschny wrote: > > > In the mean time, you can accomplish your computations without using SR: > > sage: R.<x>=QQ[[]] > > sage: (1 - x - sqrt(1 - 6*x + x^2))/(2*x) > > 1 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + ... > > Does this only work in interactive mode? As soon as I try to > capture it in a function it doesn't work anymore. > > Given
sage: var('x') sage: f=sqrt(1+x) sage: R.<t>=QQ[[]] you'd hope that f(x=t) would do the trick, but unfortunately that tries to put t into SR rather than try to evaluate it in R. A workaround: sage: F=fast_callable(f,vars=[x]) sage: f_as_power_series = F(t) It depends a bit on how you want to give f to begin with. If you want to start with an expression in SR then the approach is fairly efficient. If you know you'll be working in Q[[t]] anyway, you might as well start with creating f in that ring. > def SERIES(s): > R.<x> = QQ[[]] > return s > By definining R.<x>, you don't change s, so you just get the object s back that you passed in. What people use depends on their background: I guess that someone > who comes from Maple or Mathematica almost automatically writes > 'series' and thinks in terms of SR. > Indeed. What I meant was, given that "series" is so poor in sage presently, people cannot be using it. So apparently, people who use series in sage do so via other means. Indeed, the algebra of series is fairly well-supported via power series rings. It would be great if the pynac series would be better supported in sage (and if not, we should probably remove them entirely, because your example shows they are very misleading), but then one has to think: who's going to do the work and why hasn't it happened yet? Apparently, people have been sufficiently happy with the other means. That said, checking if a ticket exists and, if not, filing one would be good. Perhaps someone likes to work on it (you?). -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.