Optimal. Leaf size=60 \[ 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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, 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 = {209, 2520,
5040, 4964, 2449, 2352} \begin {gather*} i n \text {PolyLog}\left (2,1-\frac {2}{1+i x}\right )+\text {ArcTan}(x) \log \left (c \left (x^2+1\right )^n\right )+i n \text {ArcTan}(x)^2+2 n \text {ArcTan}(x) \log \left (\frac {2}{1+i x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 2352
Rule 2449
Rule 2520
Rule 4964
Rule 5040
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) \text {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 \begin {gather*} i n \tan ^{-1}(x)^2+2 n \tan ^{-1}(x) \log \left (\frac {2 i}{i-x}\right )+\tan ^{-1}(x) \log \left (c \left (1+x^2\right )^n\right )+i n \text {Li}_2\left (\frac {i+x}{-i+x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.14, size = 249, normalized size = 4.15
method | result | size |
risch | \(\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 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 \dilog \left (-\frac {i \left (x +i\right )}{2}\right )}{2}+\frac {i n \ln \left (x -i\right ) \ln \left (-\frac {i \left (x +i\right )}{2}\right )}{2}+\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 \dilog \left (\frac {i \left (x -i\right )}{2}\right )}{2}-\frac {i n \ln \left (x +i\right ) \ln \left (\frac {i \left (x -i\right )}{2}\right )}{2}+\frac {i \arctan \left (x \right ) \pi \,\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 \arctan \left (x \right ) \pi \,\mathrm {csgn}\left (i \left (x^{2}+1\right )^{n}\right ) \mathrm {csgn}\left (i c \left (x^{2}+1\right )^{n}\right ) \mathrm {csgn}\left (i c \right )}{2}-\frac {i \arctan \left (x \right ) \pi \mathrm {csgn}\left (i c \left (x^{2}+1\right )^{n}\right )^{3}}{2}+\frac {i \arctan \left (x \right ) \pi \mathrm {csgn}\left (i c \left (x^{2}+1\right )^{n}\right )^{2} \mathrm {csgn}\left (i c \right )}{2}+\ln \left (c \right ) \arctan \left (x \right )\) | \(249\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\log {\left (c \left (x^{2} + 1\right )^{n} \right )}}{x^{2} + 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\ln \left (c\,{\left (x^2+1\right )}^n\right )}{x^2+1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________