#980 integrate(1/(sin(x)^2+1),x,1,1+%pi) takes forever

closed
nobody
5
2007-06-22
2006-09-05
Raymond Toy
No

This is a follow-on to Bug [ 1044318 ]
defint(1/(sin(x)^2+1),x,0,3*%pi) wrong.

integrate(1/(sin(x)^2+1),x,1,1+%pi) seems to take
forever. But if the limits are 0 and %pi, the integral
is evaluated instantly with the correct value.

Discussion

  • Barton Willis

    Barton Willis - 2006-09-06

    Logged In: YES
    user_id=895922

    ldefint gives a wrong answer (basically bug 1044318)

    (%i10) ldefint(1/(sin(x)^2+1),x,1,1+%pi);
    (%o10) 0

    integrate gives an antiderivative that isn't continuous
    at odd integer multiples of %pi / 2

    (%i11) integrate(1/(sin(x)^2+1),x);
    (%o11) atan((2*tan(x))/sqrt(2))/sqrt(2)

    The expression
    atan(2*tan(x)/sqrt(2))/sqrt(2)+sqrt(2)*%pi*floor(x/%pi-1/2)/2

    might be a valid antiderivative on all of R provided the
    first term is assumed left continuous at each odd integer
    multiple of %pi/2, I think.

    Barton

     
  • Raymond Toy

    Raymond Toy - 2006-09-06

    Logged In: YES
    user_id=28849

    Looking at the code for ldefint shows why it returns 0. As
    the docs say, it evaluates the antiderivative and plugs in
    the limits.

    I believe this is why defint uses the routine intsubs and
    same-sheet-subs to handle these issues. Perhaps they're not
    doing what they're supposed to do, but in this particular
    case, maxima is stuck computing the antiderivative. I don't
    understand why.

     
  • Raymond Toy

    Raymond Toy - 2007-06-22

    Logged In: YES
    user_id=28849
    Originator: YES

    This integral no longer takes forever. Don't know how it got fixed. The result is wrong, though. See bug 1741705

    Closing this since it no longer directly applies.

     
  • Raymond Toy

    Raymond Toy - 2007-06-22
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks