On 9 November 2010 08:25, David Kirkby <david.kir...@onetel.net> wrote:

> IMHO, it would be sensible to make that the default method, which is
> what happens in Mathematica's NIntegrate command. You don't need to
> specify Nintegrate to return both the real and imaginary parts - it
> does that automatically. In this case, you can see it gets a small
> real part too, which you know is just rounding errors.
>
> In[1]:= NIntegrate[Sqrt[Sec[x]-1],{x,Pi/2,Pi}]
>
> Out[1]= 3.45315 10^-10    + 3.14159 I
>
> Dave
>

On second thoughts, this is not "rounding errors" but likely to be a
combination of both rounding errors and errors introduced as a result
of a fact one breaks the integral into a finite number of sections.
It's probably the latter effect which dominates the actual rounding
errors.

Dave

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to