Another integration issue



>>>>> "David" == David Billinghurst <Billinghurst> writes:

    David> Another integration issue from the ODE testsuite.
    David> With 5.9.3 (and before) I have

Aargh!

    David> (%i1) display2d:false;                               
    David> (%o1) false
    David> (%i2) integrand:sin(x)*%e^(log(sin(x)^2-1)/2)/cos(x);
    David> (%o2) sin(x)*%e^(log(sin(x)^2-1)/2)/cos(x)
    David> (%i3) integral:integrate(integrand,x);
    David> (%o3) -sqrt(sin(x)^2-1)

I can't look deeply into this right now, but this integral seems not
right.

If I take the rectform of the integrand and assume x is real so
sin(x)^2-1 is negative,  the result is

%i*sin(x)/cos(x)*exp(log(1-sin(x)^2)/2)

For small x, x > 0, the imaginary part is positive, so the integral
should have a positive imaginary part too.

The integral is -sqrt(sin(x)^2-1), which for small x > 0, has an
imaginary part that is negative.

At least the integral from maxima CVS has a positive imaginary part
for small x > 0.

Ray