On Sat, Sep 5, 2009 at 11:48 AM, swulf<summitw...@gmail.com> wrote: > > Hello, > > I'm new to Sage and this group. > > I have been doing some simple experimentation with integration in > order to get up to speed. One thing I attempted was to try and > calculate an integral, attempting to reproduce the problem described > on this page: > > http://mathforum.org/library/drmath/view/52038.html > > Here is how I gave the problem to Sage (V4.1.1 under Windows): > > f=sin(x) > g=f.diff(x) > h=(sqrt(g^2+1)) > j=integral(h,x,0,2*pi) > j > > Here is the response from Sage: > > integrate(sqrt(cos(x)^2 + 1), x, 0, 2*pi) > > This looks like Sage can't perform the integration, and it seems the > sqrt is the problem, although it doesn't flag any sort of error. In > the web page I give above, the problem is solved with MAPLE... so I am > not sure why Sage has a problem with it?
Returning the integral as an integral is what Sage does when it is unable to do the computation. Currently, by default, Maxima behind the scenes does all *symbolic* integration in Sage, and Maxima's integration abilities are not as sophisticated as Maple/Mathematica. You can compute the integral numerically, by the way: sage: val, err = numerical_integral(sqrt(cos(x)^2 + 1), 0, 2*pi) sage: val 7.6403955780554229 sage: err 3.742491026888652e-12 > I suspect I am missing something or doing something stupid. Can anyone > enlighten me please? > > Thanks, > > swulf > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---