So it happened again... I had such a discussion some time ago in one
other thread are are several other problems with numerical integration
which occour.

The thing is, that sage holds a lot of tool to perform numerical
integration to get a good answer (pari, mpmath, scipy etc.) but
sometimes it would be nice to get something more user friendly.

I'm planning to do some work on this, at least improving more control
of the choice of numerical integration methods for the user.
But it won't happening in the next time because I have a lot of work
to do, and I have to finish some other things, like a new version of
orthogonal polynomials before.

Another goal would be doing something similar to Mathematica's
NIntegrate, but his would take some years and should only considered
as long time goal for sage.

-maldun

On Oct 14, 6:01 am, Oscar Gerardo Lazo Arjona
<algebraicame...@gmail.com> wrote:
> Hello people!
>
> I've been trying to solve this integral:
>
> sage: integrate(sqrt(sec(x)-1),x,pi/2,pi)
> integrate(sqrt(sec(x) - 1), x, 1/2*pi, pi)
>
> Since sage failed to produce a symbolic result, I tried with
> numerical_integral
>
> sage: numerical_integral(sqrt(sec(x)-1),pi/2,pi)
> (nan, nan)
>
> But that failed also... So I tried with mathematica:
>
> sage: mathematica_console()
>          Mathematica 7.0 for Linux x86 (32-bit)
> Copyright 1988-2008 Wolfram Research, Inc.
>
> In[1]:= Integrate[Sqrt[Sec[x]-1],{x,Pi/2,Pi}]
>
> Out[1]= I Pi
>
> So mathematica says it's a pure imaginary number, which I know to be true.
>
> I know that symbolic integration is quite complicated to develop, but
> numerical integration should be fairly easy to extend to complex
> numbers. Am I missing something? Why does numerical_integral return NaN?
> Perhaps i'ts not because of the complex result, in which case how could
> I solve the integral without recurring to mathematica?
>
> thanks!
>
> Oscar.

-- 
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