Optimal. Leaf size=60 \[ \tan ^{-1}(x) \log \left (c \left (x^2+1\right )^n\right )+i n \text {Li}_2\left (1-\frac {2}{i x+1}\right )+i n \tan ^{-1}(x)^2+2 n \log \left (\frac {2}{1+i x}\right ) \tan ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {203, 2470, 4920, 4854, 2402, 2315} \[ i n \text {PolyLog}\left (2,1-\frac {2}{1+i x}\right )+\tan ^{-1}(x) \log \left (c \left (x^2+1\right )^n\right )+i n \tan ^{-1}(x)^2+2 n \log \left (\frac {2}{1+i x}\right ) \tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 2315
Rule 2402
Rule 2470
Rule 4854
Rule 4920
Rubi steps
\begin {align*} \int \frac {\log \left (c \left (1+x^2\right )^n\right )}{1+x^2} \, dx &=\tan ^{-1}(x) \log \left (c \left (1+x^2\right )^n\right )-(2 n) \int \frac {x \tan ^{-1}(x)}{1+x^2} \, dx\\ &=i n \tan ^{-1}(x)^2+\tan ^{-1}(x) \log \left (c \left (1+x^2\right )^n\right )+(2 n) \int \frac {\tan ^{-1}(x)}{i-x} \, dx\\ &=i n \tan ^{-1}(x)^2+2 n \tan ^{-1}(x) \log \left (\frac {2}{1+i x}\right )+\tan ^{-1}(x) \log \left (c \left (1+x^2\right )^n\right )-(2 n) \int \frac {\log \left (\frac {2}{1+i x}\right )}{1+x^2} \, dx\\ &=i n \tan ^{-1}(x)^2+2 n \tan ^{-1}(x) \log \left (\frac {2}{1+i x}\right )+\tan ^{-1}(x) \log \left (c \left (1+x^2\right )^n\right )+(2 i n) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i x}\right )\\ &=i n \tan ^{-1}(x)^2+2 n \tan ^{-1}(x) \log \left (\frac {2}{1+i x}\right )+\tan ^{-1}(x) \log \left (c \left (1+x^2\right )^n\right )+i n \text {Li}_2\left (1-\frac {2}{1+i x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 62, normalized size = 1.03 \[ \tan ^{-1}(x) \log \left (c \left (x^2+1\right )^n\right )+i n \text {Li}_2\left (\frac {x+i}{x-i}\right )+i n \tan ^{-1}(x)^2+2 n \log \left (\frac {2 i}{-x+i}\right ) \tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.43, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\log \left ({\left (x^{2} + 1\right )}^{n} c\right )}{x^{2} + 1}, x\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 \frac {\log \left ({\left (x^{2} + 1\right )}^{n} c\right )}{x^{2} + 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.62, size = 249, normalized size = 4.15 \[ -\frac {i \pi \arctan \relax (x ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (x^{2}+1\right )^{n}\right ) \mathrm {csgn}\left (i c \left (x^{2}+1\right )^{n}\right )}{2}+\frac {i \pi \arctan \relax (x ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (x^{2}+1\right )^{n}\right )^{2}}{2}+\frac {i \pi \arctan \relax (x ) \mathrm {csgn}\left (i \left (x^{2}+1\right )^{n}\right ) \mathrm {csgn}\left (i c \left (x^{2}+1\right )^{n}\right )^{2}}{2}-\frac {i \pi \arctan \relax (x ) \mathrm {csgn}\left (i c \left (x^{2}+1\right )^{n}\right )^{3}}{2}-n \arctan \relax (x ) \ln \left (x^{2}+1\right )+\frac {i n \ln \left (-\frac {i \left (x +i\right )}{2}\right ) \ln \left (x -i\right )}{2}-\frac {i n \ln \left (\frac {i \left (x -i\right )}{2}\right ) \ln \left (x +i\right )}{2}+\frac {i n \ln \left (x -i\right )^{2}}{4}-\frac {i n \ln \left (x -i\right ) \ln \left (x^{2}+1\right )}{2}-\frac {i n \ln \left (x +i\right )^{2}}{4}+\frac {i n \ln \left (x +i\right ) \ln \left (x^{2}+1\right )}{2}+\frac {i n \dilog \left (-\frac {i \left (x +i\right )}{2}\right )}{2}-\frac {i n \dilog \left (\frac {i \left (x -i\right )}{2}\right )}{2}+\arctan \relax (x ) \ln \relax (c )+\arctan \relax (x ) \ln \left (\left (x^{2}+1\right )^{n}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log \left ({\left (x^{2} + 1\right )}^{n} c\right )}{x^{2} + 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {\ln \left (c\,{\left (x^2+1\right )}^n\right )}{x^2+1} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log {\left (c \left (x^{2} + 1\right )^{n} \right )}}{x^{2} + 1}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________