#781 integrate((tan(x)^2+1)/tan(x),x,%pi/6,%pi/3) - error

closed
nobody
5
2007-06-19
2005-09-13
No

(%i1) integrate((tan(x)^2+1)/tan(x),x,%pi/6,%pi/3);
`sign' called on an imaginary argument:
1/4
(- 1)
-- an error. Quitting. To debug this try
debugmode(true);

Right result is log(3).

Discussion

  • Raymond Toy
    Raymond Toy
    2006-02-16

    Logged In: YES
    user_id=28849

    This integral is converted to

    integrate((1+tan(x+%pi/6)^2)/tan(x+%pi/6),x,0,%pi/6)

    Eventually, rischint is called and the error comes from
    somewhere in rischint.

     
  • Robert Dodier
    Robert Dodier
    2006-04-10

    • labels: --> Lisp Core - Integration
     
  • Raymond Toy
    Raymond Toy
    2007-06-19

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

    Logged In: YES
    user_id=28849
    Originator: NO

    This no longer produces an error. After asking if sin(x+%pi/6) is positive and if sin(x+%pi/3) is positive (I answered "yes"), maxima says the answer is

    log(sqrt(3)/2)+log(4)/2+log(2)+log(3/4)/2

    logcontract converts this to log(9)/2, which is log(3).

    Closing this bug. Should another bug be opened because maxima asks these questions? The questions come from limit, via sin-cos-intsubs.