On Mon, Sep 28, 2020 at 04:03:48PM -0400, Fernando Q. Gouvea wrote: > I am trying to see how to do a standard calculus exercise in Sage. I want a > power series for the integral of sin(x)/x. I tried: > > sage: var('t') > t > sage: assume(x>0) > sage: f(x)=integrate(sin(t)/t,t,0,x) > sage: f > x |--> sin_integral(x) > sage: taylor(f(x),x,0,10) > 73/466560*x^9 - 127/35280*x^7 + 31/600*x^5 - 7/18*x^3 + x
That's odd. I get the same behavior in sage8.9 and my current develop branch of sage. Annoyingly, I notice that if you get the Taylor series as you might in a calculus class, by first getting the Taylor series and then integrating it term by term, it comes out differently (and correctly). var('t') littlef(t) = taylor(sin(t)/t, t, 0, 10) bigf(x) = integrate(littlef(t), t, 0, x) x |--> -1/439084800*x^11 + 1/3265920*x^9 - 1/35280*x^7 + 1/600*x^5 - 1/18*x^3 + x I don't know why what you tried fails. This seems to be a bug. On the trac, this seems closely related to 1. https://trac.sagemath.org/ticket/11164 2. https://trac.sagemath.org/ticket/30389 - DLD -- David Lowry-Duda <da...@lowryduda.com> <davidlowryduda.com> -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/20200928204921.GA13285%40icerm-dld.