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