Optimal. Leaf size=51 \[ x \log (a \tan (x))-\frac {1}{2} i \text {Li}_2\left (-e^{2 i x}\right )+\frac {1}{2} i \text {Li}_2\left (e^{2 i x}\right )+2 x \tanh ^{-1}\left (e^{2 i x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {2548, 4419, 4183, 2279, 2391} \[ -\frac {1}{2} i \text {PolyLog}\left (2,-e^{2 i x}\right )+\frac {1}{2} i \text {PolyLog}\left (2,e^{2 i x}\right )+x \log (a \tan (x))+2 x \tanh ^{-1}\left (e^{2 i x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2279
Rule 2391
Rule 2548
Rule 4183
Rule 4419
Rubi steps
\begin {align*} \int \log (a \tan (x)) \, dx &=x \log (a \tan (x))-\int x \csc (x) \sec (x) \, dx\\ &=x \log (a \tan (x))-2 \int x \csc (2 x) \, dx\\ &=2 x \tanh ^{-1}\left (e^{2 i x}\right )+x \log (a \tan (x))+\int \log \left (1-e^{2 i x}\right ) \, dx-\int \log \left (1+e^{2 i x}\right ) \, dx\\ &=2 x \tanh ^{-1}\left (e^{2 i x}\right )+x \log (a \tan (x))-\frac {1}{2} i \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i x}\right )+\frac {1}{2} i \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i x}\right )\\ &=2 x \tanh ^{-1}\left (e^{2 i x}\right )+x \log (a \tan (x))-\frac {1}{2} i \text {Li}_2\left (-e^{2 i x}\right )+\frac {1}{2} i \text {Li}_2\left (e^{2 i x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 75, normalized size = 1.47 \[ -\frac {1}{2} i \log (-i (-\tan (x)+i)) \log (a \tan (x))+\frac {1}{2} i \log (-i (\tan (x)+i)) \log (a \tan (x))-\frac {1}{2} i \text {Li}_2(-i \tan (x))+\frac {1}{2} i \text {Li}_2(i \tan (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 184, normalized size = 3.61 \[ x \log \left (a \tan \relax (x)\right ) - \frac {1}{2} \, x \log \left (\frac {2 \, {\left (\tan \relax (x)^{2} + i \, \tan \relax (x)\right )}}{\tan \relax (x)^{2} + 1}\right ) - \frac {1}{2} \, x \log \left (\frac {2 \, {\left (\tan \relax (x)^{2} - i \, \tan \relax (x)\right )}}{\tan \relax (x)^{2} + 1}\right ) + \frac {1}{2} \, x \log \left (-\frac {2 \, {\left (i \, \tan \relax (x) - 1\right )}}{\tan \relax (x)^{2} + 1}\right ) + \frac {1}{2} \, x \log \left (-\frac {2 \, {\left (-i \, \tan \relax (x) - 1\right )}}{\tan \relax (x)^{2} + 1}\right ) - \frac {1}{4} i \, {\rm Li}_2\left (-\frac {2 \, {\left (\tan \relax (x)^{2} + i \, \tan \relax (x)\right )}}{\tan \relax (x)^{2} + 1} + 1\right ) + \frac {1}{4} i \, {\rm Li}_2\left (-\frac {2 \, {\left (\tan \relax (x)^{2} - i \, \tan \relax (x)\right )}}{\tan \relax (x)^{2} + 1} + 1\right ) + \frac {1}{4} i \, {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \relax (x) - 1\right )}}{\tan \relax (x)^{2} + 1} + 1\right ) - \frac {1}{4} i \, {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \relax (x) - 1\right )}}{\tan \relax (x)^{2} + 1} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \log \left (a \tan \relax (x)\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.17, size = 82, normalized size = 1.61 \[ -\frac {i \ln \left (a \tan \relax (x )\right ) \ln \left (\frac {i a \tan \relax (x )+a}{a}\right )}{2}+\frac {i \ln \left (a \tan \relax (x )\right ) \ln \left (-\frac {i a \tan \relax (x )-a}{a}\right )}{2}-\frac {i \dilog \left (\frac {i a \tan \relax (x )+a}{a}\right )}{2}+\frac {i \dilog \left (-\frac {i a \tan \relax (x )-a}{a}\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.62, size = 42, normalized size = 0.82 \[ x \log \left (a \tan \relax (x)\right ) + \frac {1}{4} \, \pi \log \left (\tan \relax (x)^{2} + 1\right ) - x \log \left (\tan \relax (x)\right ) + \frac {1}{2} i \, {\rm Li}_2\left (i \, \tan \relax (x) + 1\right ) - \frac {1}{2} i \, {\rm Li}_2\left (-i \, \tan \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.09, size = 39, normalized size = 0.76 \[ 2\,x\,\mathrm {atanh}\left ({\mathrm {e}}^{x\,2{}\mathrm {i}}\right )+x\,\ln \left (a\,\mathrm {tan}\relax (x)\right )-\frac {\mathrm {polylog}\left (2,-{\mathrm {e}}^{x\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}}{2}+\frac {\mathrm {polylog}\left (2,{\mathrm {e}}^{x\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \log {\left (a \tan {\relax (x )} \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________