Integrand size = 7, antiderivative size = 49 \[ \int \log \left (a \cot ^2(x)\right ) \, dx=-4 x \text {arctanh}\left (e^{2 i x}\right )+x \log \left (a \cot ^2(x)\right )+i \operatorname {PolyLog}\left (2,-e^{2 i x}\right )-i \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \]
Time = 0.01 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.53 \[ \int \log \left (a \cot ^2(x)\right ) \, dx=-\frac {1}{2} i \log \left (a \cot ^2(x)\right ) \log (-i (i-\tan (x)))+\frac {1}{2} i \log \left (a \cot ^2(x)\right ) \log (-i (i+\tan (x)))+i \operatorname {PolyLog}(2,-i \tan (x))-i \operatorname {PolyLog}(2,i \tan (x)) \]
(-1/2*I)*Log[a*Cot[x]^2]*Log[(-I)*(I - Tan[x])] + (I/2)*Log[a*Cot[x]^2]*Lo g[(-I)*(I + Tan[x])] + I*PolyLog[2, (-I)*Tan[x]] - I*PolyLog[2, I*Tan[x]]
Time = 0.33 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.14, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {3028, 27, 4919, 3042, 4671, 2715, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \log \left (a \cot ^2(x)\right ) \, dx\) |
\(\Big \downarrow \) 3028 |
\(\displaystyle x \log \left (a \cot ^2(x)\right )-\int -2 x \csc (x) \sec (x)dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 2 \int x \csc (x) \sec (x)dx+x \log \left (a \cot ^2(x)\right )\) |
\(\Big \downarrow \) 4919 |
\(\displaystyle 4 \int x \csc (2 x)dx+x \log \left (a \cot ^2(x)\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 \int x \csc (2 x)dx+x \log \left (a \cot ^2(x)\right )\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle x \log \left (a \cot ^2(x)\right )+4 \left (-\frac {1}{2} \int \log \left (1-e^{2 i x}\right )dx+\frac {1}{2} \int \log \left (1+e^{2 i x}\right )dx-x \text {arctanh}\left (e^{2 i x}\right )\right )\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle x \log \left (a \cot ^2(x)\right )+4 \left (\frac {1}{4} i \int e^{-2 i x} \log \left (1-e^{2 i x}\right )de^{2 i x}-\frac {1}{4} i \int e^{-2 i x} \log \left (1+e^{2 i x}\right )de^{2 i x}-x \text {arctanh}\left (e^{2 i x}\right )\right )\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle x \log \left (a \cot ^2(x)\right )+4 \left (-x \text {arctanh}\left (e^{2 i x}\right )+\frac {1}{4} i \operatorname {PolyLog}\left (2,-e^{2 i x}\right )-\frac {1}{4} i \operatorname {PolyLog}\left (2,e^{2 i x}\right )\right )\) |
x*Log[a*Cot[x]^2] + 4*(-(x*ArcTanh[E^((2*I)*x)]) + (I/4)*PolyLog[2, -E^((2 *I)*x)] - (I/4)*PolyLog[2, E^((2*I)*x)])
3.2.71.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[x*(D[u, x]/u), x], x] /; InverseFunctionFreeQ[u, x]
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[- 2*(c + d*x)^m*(ArcTanh[E^(I*(e + f*x))]/f), x] + (-Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x )^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IG tQ[m, 0]
Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b _.)*(x_)]^(n_.), x_Symbol] :> Simp[2^n Int[(c + d*x)^m*Csc[2*a + 2*b*x]^n , x], x] /; FreeQ[{a, b, c, d, m}, x] && IntegerQ[n] && RationalQ[m]
Time = 1.09 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.67
method | result | size |
derivativedivides | \(\frac {i \left (\ln \left (\cot \left (x \right )-i\right ) \ln \left (a \left (\cot ^{2}\left (x \right )\right )\right )-2 \operatorname {dilog}\left (-i \cot \left (x \right )\right )-2 \ln \left (\cot \left (x \right )-i\right ) \ln \left (-i \cot \left (x \right )\right )\right )}{2}-\frac {i \left (\ln \left (\cot \left (x \right )+i\right ) \ln \left (a \left (\cot ^{2}\left (x \right )\right )\right )-2 \operatorname {dilog}\left (i \cot \left (x \right )\right )-2 \ln \left (\cot \left (x \right )+i\right ) \ln \left (i \cot \left (x \right )\right )\right )}{2}\) | \(82\) |
default | \(\frac {i \left (\ln \left (\cot \left (x \right )-i\right ) \ln \left (a \left (\cot ^{2}\left (x \right )\right )\right )-2 \operatorname {dilog}\left (-i \cot \left (x \right )\right )-2 \ln \left (\cot \left (x \right )-i\right ) \ln \left (-i \cot \left (x \right )\right )\right )}{2}-\frac {i \left (\ln \left (\cot \left (x \right )+i\right ) \ln \left (a \left (\cot ^{2}\left (x \right )\right )\right )-2 \operatorname {dilog}\left (i \cot \left (x \right )\right )-2 \ln \left (\cot \left (x \right )+i\right ) \ln \left (i \cot \left (x \right )\right )\right )}{2}\) | \(82\) |
risch | \(\text {Expression too large to display}\) | \(664\) |
1/2*I*(ln(cot(x)-I)*ln(a*cot(x)^2)-2*dilog(-I*cot(x))-2*ln(cot(x)-I)*ln(-I *cot(x)))-1/2*I*(ln(cot(x)+I)*ln(a*cot(x)^2)-2*dilog(I*cot(x))-2*ln(cot(x) +I)*ln(I*cot(x)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 148 vs. \(2 (34) = 68\).
Time = 0.38 (sec) , antiderivative size = 148, normalized size of antiderivative = 3.02 \[ \int \log \left (a \cot ^2(x)\right ) \, dx=x \log \left (-\frac {a \cos \left (2 \, x\right ) + a}{\cos \left (2 \, x\right ) - 1}\right ) - x \log \left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right ) - x \log \left (\cos \left (2 \, x\right ) - i \, \sin \left (2 \, x\right ) + 1\right ) + x \log \left (-\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right ) + x \log \left (-\cos \left (2 \, x\right ) - i \, \sin \left (2 \, x\right ) + 1\right ) - \frac {1}{2} i \, {\rm Li}_2\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right )\right ) + \frac {1}{2} i \, {\rm Li}_2\left (\cos \left (2 \, x\right ) - i \, \sin \left (2 \, x\right )\right ) - \frac {1}{2} i \, {\rm Li}_2\left (-\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right )\right ) + \frac {1}{2} i \, {\rm Li}_2\left (-\cos \left (2 \, x\right ) - i \, \sin \left (2 \, x\right )\right ) \]
x*log(-(a*cos(2*x) + a)/(cos(2*x) - 1)) - x*log(cos(2*x) + I*sin(2*x) + 1) - x*log(cos(2*x) - I*sin(2*x) + 1) + x*log(-cos(2*x) + I*sin(2*x) + 1) + x*log(-cos(2*x) - I*sin(2*x) + 1) - 1/2*I*dilog(cos(2*x) + I*sin(2*x)) + 1 /2*I*dilog(cos(2*x) - I*sin(2*x)) - 1/2*I*dilog(-cos(2*x) + I*sin(2*x)) + 1/2*I*dilog(-cos(2*x) - I*sin(2*x))
\[ \int \log \left (a \cot ^2(x)\right ) \, dx=\int \log {\left (a \cot ^{2}{\left (x \right )} \right )}\, dx \]
Time = 0.28 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.90 \[ \int \log \left (a \cot ^2(x)\right ) \, dx=-\frac {1}{2} \, \pi \log \left (\tan \left (x\right )^{2} + 1\right ) + x \log \left (\frac {a}{\tan \left (x\right )^{2}}\right ) + 2 \, x \log \left (\tan \left (x\right )\right ) - i \, {\rm Li}_2\left (i \, \tan \left (x\right ) + 1\right ) + i \, {\rm Li}_2\left (-i \, \tan \left (x\right ) + 1\right ) \]
-1/2*pi*log(tan(x)^2 + 1) + x*log(a/tan(x)^2) + 2*x*log(tan(x)) - I*dilog( I*tan(x) + 1) + I*dilog(-I*tan(x) + 1)
\[ \int \log \left (a \cot ^2(x)\right ) \, dx=\int { \log \left (a \cot \left (x\right )^{2}\right ) \,d x } \]
Timed out. \[ \int \log \left (a \cot ^2(x)\right ) \, dx=\int \ln \left (a\,{\mathrm {cot}\left (x\right )}^2\right ) \,d x \]