Menu ▾ ▴

#2156 integrate_sqrt_of_trig

open
nobody
5
2015-06-18
2011-03-04
d-stanislav
No

(%i1) integrate(sqrt(1-cos(x)^2),x,0,%pi/2);
(%o1) - 1 ( right answer: 1 )
(%i2) integrate(sqrt(1-sin(x)^2),x,0,%pi/2);
Is tan(x) positive or negative?p;
(%o2) - 1 ( right answer: 1 )
-------------------------------------------------------------
Maxima version: 5.23.2
Maxima build date: 17:9 1/17/2011
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8
-------------------------------------------------------------

Discussion

  • Dieter Kaiser

    Dieter Kaiser - 2011-03-12

    Both examples are correct, when setting the option variable radexpand to false:

    (%i1) radexpand:false$

    (%i2) integrate(sqrt(1-cos(x)^2),x,0,%pi/2);
    (%o2) 1

    (%i3) integrate(sqrt(1-sin(x)^2),x,0,%pi/2);
    (%o3) 1

    By the way, the indefinite integrals are more correct too:

    (%i4) integrate(sqrt(1-cos(x)^2),x);
    (%o4) -1/sqrt(tan(x)^2+1)

    (%i5) integrate(sqrt(1-sin(x)^2),x);
    (%o5) tan(x)/sqrt(tan(x)^2+1)

    I think it is a general problem, that the option variable radexpand introduces wrong simplifications.

    Dieter Kaiser

     
  • d-stanislav

    d-stanislav - 2011-03-13

    Unfortunately, option radexpand:false does not give a right results:
    (%i1) radexpand:false;
    (%o1) false(%i2) integrate(sqrt(1-cos(x)^2),x,0,%pi);
    (%o2) 0 (wrong)
    (%i3) integrate(abs(sin(x)),x,0,%pi);
    (%o3) 2 (right, but occasionally)
    (%i4) integrate(sqrt(1-cos(x)^2),x,0,2*%pi);
    (%o4) 0 (wrong)
    (%i5) integrate(abs(sin(x)),x,0,2*%pi);
    (%o5) 0 (wrong)
    (%i6) wxplot2d(sqrt(1-cos(t)^2),[t,0,2*%pi],[x,-1,7],[y,-2,2]);
    (%t6) << Graphics >>
    (%i7) integrate(sqrt(1-sin(x)^2),x,0,%pi);
    (%o7) 0 (wrong)
    (%i8) integrate(abs(cos(x)),x,0,%pi);
    (%o8) integrate(abs(cos(x)),x,0,%pi) (no action)

     
  • sslavi

    sslavi - 2015-06-18

    I can confirm this bug on my system too. Actually, I am not even getting to the point where it asks "Is tan(x) positive or negative?". Please find enclosed the screenshot of all the options I have tried.

    System info:
    Maxima 5.36.1
    SBCL 1.2.7
    Win 8.1 64-bit

     

    Last edit: sslavi 2015-06-18
  • sslavi

    sslavi - 2015-06-18

    The radexpand:false$ instruction doesn't help either. Actually, it increases the number of cases which end with an error message. See the screenshot.

    Why is Maxima going using the Atanh() function anyways, in this case?

     

Log in to post a comment.