Subject: New integrals with integrand of type log(trig(x))
From: Dieter Kaiser
Date: Fri, 24 Apr 2009 00:15:30 +0200
Today, I had a look at integrals of the logarithmic function with
trigonometric or hyperbolic functions as an argument, e.g.
integrate(log(sin(x)),x)
Unfortunately, I have detected a silly bug in the routine risplit. I
have introduced this bug, which causes a Lisp error, when we try to
solve these integrals. I have already committed a fix.
Because of the last extensions to the integrator and with the bug fix to
the routine risplit, we get results for these integrals, e.g.
(%i5) integrate(log(sin(x)),x);
(%o5) x*log(sin(x))-(x*log(sin(x)^2+cos(x)^2+2*cos(x)+1)
+x*log(sin(x)^2+cos(x)^2-2*cos(x)+1)
+2*%i*x*atan2(sin(x),cos(x)+1)
+2*%i*x*atan2(-sin(x),1-cos(x))-2*%i*li[2](%e^(%
i*x))
-2*%i*li[2](-%e^(%i*x))-%i*x^2)
/2
(%i6) integrate(log(cos(x)),x);
(%o6) x*log(cos(x))-(x*log(sin(2*x)^2+cos(2*x)^2+2*cos(2*x)+1)
+2*%i*x*atan2(sin(2*x),cos(2*x)+1)-%i*li[2](-%e^(2*%
i*x))
-%i*x^2)
/2
(%i7) integrate(log(tan(x)),x);
(%o7) x*log(tan(x))-((2*atan(integrate(log(tan(x)),x))
-2*atan(-integrate(log(tan(x)),x)))
*log(abs(integrate(log(tan(x)),x)))
-%pi*log(integrate(log(tan(x)),x)^2+1)
-2*%i*li[2](%i*integrate(log(tan(x)),x)+1)
+2*%i*li[2](1-%i*integrate(log(tan(x)),x))
+(2*%i*atan2(0,integrate(log(tan(x)),x))-%i*%pi)
*atan(integrate(log(tan(x)),x))
+(-2*%i*atan2(0,integrate(log(tan(x)),x))-%i*%pi)
*atan(-integrate(log(tan(x)),x)))
/4
(%i8) integrate(log(sinh(x)),x);
(%o8) x*log(sinh(x))-x*log(%e^x+1)-li[2](%e^x)-li[2](-%e^x)-x*log(1-%
e^x)
+x^2/2
(%i9) integrate(log(cosh(x)),x);
(%o9) x*log(cosh(x))-(2*x*log(%e^(2*x)+1)+li[2](-%e^(2*x)))/2+x^2/2
(%i10) integrate(log(tanh(x)),x);
(%o10) x*log(tanh(x))-4*(-(2*x*log(%e^(2*x)+1)+li[2](-%e^(2*x)))/8
+(x*log(%e^x+1)+li[2](-%e^x))/4
+(li[2](%e^x)+x*log(1-%e^x))/4)
I have to check these results. Some of the results are not well
simplified, but the integrals seems to be correct.
Dieter Kaiser