On Mon, Sep 28, 2020 at 9:03 PM Fernando Q. Gouvea <fqgou...@colby.edu> 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 > > The first weirdness is that Sage can't compute the integral unless I add the > "assume(x>0)"; I'm not sure why.
this is Maxima weirdness. Note that the following works without assumptions. integrate(sin(t)/t,t,0,x,algorithm='sympy') > > The second weirdness is that the Taylor series is wrong! Taylor(Si(x),x,0,10) > gives the same answer. this is broken in 9.1, but seems to have been fixed in our latest betas. Dima > > Fernando > > > -- > ================================================================== > Fernando Q. Gouvea > Carter Professor of Mathematics > Colby College > Mayflower Hill 5836 > Waterville, ME 04901 > fqgou...@colby.edu http://www.colby.edu/~fqgouvea > > The object of opening the mind, as of opening the mouth, is to shut it > again on something solid. > -- G. K. Chesterton, Autobiography. > > -- > 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/5624ba1e-9194-6d00-864a-8fa2a83d1698%40colby.edu. -- 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/CAAWYfq3PS41xuhXG%3DOHZdmp5SdpthW%3DA1Jbtw_Bu5dHy_oRopA%40mail.gmail.com.