integration of x*tan(x)^2 fails with logabs:true



Dear Maxima users and developers

my maxima fails to evaluate the integral of 
x*tan(x)^2  if logabs is true. More preciselly, maxima asks 
Is  cos(2 x) + 1  positive or negative?

No question appears if logabs is false. See the output below. (The same is with
recent maxima on windows).

Is this behavior correct? Is it a bug in integration code?

Thank you

Robert Marik

-------------------------------------
maxima --batch-string="display2d:false;integrate(x*tan(x)^2,x);"

Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1)                          display2d : false
(%o1) false
(%i2) integrate(x*tan(x)^2,x)
(%o2) ((sin(2*x)^2+cos(2*x)^2+2*cos(2*x)+1)
       *log(sin(2*x)^2+cos(2*x)^2+2*cos(2*x)+1)
       -x^2*sin(2*x)^2+4*x*sin(2*x)-x^2*cos(2*x)^2-2*x^2*cos(2*x)-x^2)
       /(2*sin(2*x)^2+2*cos(2*x)^2+4*cos(2*x)+2)

--------------------------------------------------

maxima --batch-string="display2d:false;logabs:true;integrate(x*tan(x)^2,x);"

Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1)                          display2d : false
(%o1) false
(%i2) logabs:true
(%o2) true
(%i3) integrate(x*tan(x)^2,x)
Is  cos(2*x)+1  positive or negative?

pos;
(%o3) ((sin(2*x)^2+cos(2*x)^2+2*cos(2*x)+1)*log(2*cos(2*x)+2)
       -x^2*sin(2*x)^2+4*x*sin(2*x)-x^2*cos(2*x)^2-2*x^2*cos(2*x)-x^2)
       /(2*sin(2*x)^2+2*cos(2*x)^2+4*cos(2*x)+2)