Optimal. Leaf size=60 \[ 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) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0807481, antiderivative size = 60, normalized size of antiderivative = 1., 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 2470
Rule 4920
Rule 4854
Rule 2402
Rule 2315
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.0062376, size = 62, normalized size = 1.03 \[ i n \text{PolyLog}\left (2,\frac{x+i}{x-i}\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 i}{-x+i}\right ) \tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.092, size = 249, normalized size = 4.2 \begin{align*} \arctan \left ( x \right ) \ln \left ( \left ({x}^{2}+1 \right ) ^{n} \right ) -n\ln \left ({x}^{2}+1 \right ) \arctan \left ( x \right ) -{\frac{i}{2}}n\ln \left ({x}^{2}+1 \right ) \ln \left ( x-i \right ) +{\frac{i}{4}}n \left ( \ln \left ( x-i \right ) \right ) ^{2}+{\frac{i}{2}}n\ln \left ( x-i \right ) \ln \left ( -{\frac{i}{2}} \left ( x+i \right ) \right ) +{\frac{i}{2}}n{\it dilog} \left ( -{\frac{i}{2}} \left ( x+i \right ) \right ) +{\frac{i}{2}}n\ln \left ({x}^{2}+1 \right ) \ln \left ( x+i \right ) -{\frac{i}{4}}n \left ( \ln \left ( x+i \right ) \right ) ^{2}-{\frac{i}{2}}n\ln \left ( x+i \right ) \ln \left ({\frac{i}{2}} \left ( x-i \right ) \right ) -{\frac{i}{2}}n{\it dilog} \left ({\frac{i}{2}} \left ( x-i \right ) \right ) -{\frac{i}{2}}\arctan \left ( x \right ) \pi \,{\it csgn} \left ( ic \right ){\it csgn} \left ( i \left ({x}^{2}+1 \right ) ^{n} \right ){\it csgn} \left ( ic \left ({x}^{2}+1 \right ) ^{n} \right ) +{\frac{i}{2}}\arctan \left ( x \right ) \pi \,{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic \left ({x}^{2}+1 \right ) ^{n} \right ) \right ) ^{2}+{\frac{i}{2}}\arctan \left ( x \right ) \pi \,{\it csgn} \left ( i \left ({x}^{2}+1 \right ) ^{n} \right ) \left ({\it csgn} \left ( ic \left ({x}^{2}+1 \right ) ^{n} \right ) \right ) ^{2}-{\frac{i}{2}}\arctan \left ( x \right ) \pi \, \left ({\it csgn} \left ( ic \left ({x}^{2}+1 \right ) ^{n} \right ) \right ) ^{3}+\arctan \left ( x \right ) \ln \left ( c \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left ({\left (x^{2} + 1\right )}^{n} c\right )}{x^{2} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left ({\left (x^{2} + 1\right )}^{n} c\right )}{x^{2} + 1}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log{\left (c \left (x^{2} + 1\right )^{n} \right )}}{x^{2} + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left ({\left (x^{2} + 1\right )}^{n} c\right )}{x^{2} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]