3.277 \(\int \frac {\log (c (1+x^2)^n)}{1+x^2} \, dx\)

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]

I*n*arctan(x)^2+2*n*arctan(x)*ln(2/(1+I*x))+arctan(x)*ln(c*(x^2+1)^n)+I*n*polylog(2,1-2/(1+I*x))

________________________________________________________________________________________

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]

Int[Log[c*(1 + x^2)^n]/(1 + x^2),x]

[Out]

I*n*ArcTan[x]^2 + 2*n*ArcTan[x]*Log[2/(1 + I*x)] + ArcTan[x]*Log[c*(1 + x^2)^n] + I*n*PolyLog[2, 1 - 2/(1 + I*
x)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2470

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))/((f_) + (g_.)*(x_)^2), x_Symbol] :> With[{u = In
tHide[1/(f + g*x^2), x]}, Simp[u*(a + b*Log[c*(d + e*x^n)^p]), x] - Dist[b*e*n*p, Int[(u*x^(n - 1))/(d + e*x^n
), x], x]] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IntegerQ[n]

Rule 4854

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])^p*Lo
g[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTan[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 + c^2*x^
2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 4920

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> -Simp[(I*(a + b*ArcTan
[c*x])^(p + 1))/(b*e*(p + 1)), x] - Dist[1/(c*d), Int[(a + b*ArcTan[c*x])^p/(I - c*x), x], x] /; FreeQ[{a, b,
c, d, e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0]

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]

Integrate[Log[c*(1 + x^2)^n]/(1 + x^2),x]

[Out]

I*n*ArcTan[x]^2 + 2*n*ArcTan[x]*Log[(2*I)/(I - x)] + ArcTan[x]*Log[c*(1 + x^2)^n] + I*n*PolyLog[2, (I + x)/(-I
 + x)]

________________________________________________________________________________________

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]

integrate(log(c*(x^2+1)^n)/(x^2+1),x, algorithm="fricas")

[Out]

integral(log((x^2 + 1)^n*c)/(x^2 + 1), x)

________________________________________________________________________________________

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]

integrate(log(c*(x^2+1)^n)/(x^2+1),x, algorithm="giac")

[Out]

integrate(log((x^2 + 1)^n*c)/(x^2 + 1), x)

________________________________________________________________________________________

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]

int(ln(c*(x^2+1)^n)/(x^2+1),x)

[Out]

arctan(x)*ln((x^2+1)^n)-n*ln(x^2+1)*arctan(x)-1/2*I*n*ln(x-I)*ln(x^2+1)+1/2*I*n*dilog(-1/2*I*(x+I))+1/2*I*n*ln
(x-I)*ln(-1/2*I*(x+I))+1/4*I*n*ln(x-I)^2+1/2*I*n*ln(x+I)*ln(x^2+1)-1/2*I*n*dilog(1/2*I*(x-I))-1/2*I*n*ln(x+I)*
ln(1/2*I*(x-I))-1/4*I*n*ln(x+I)^2+1/2*I*arctan(x)*Pi*csgn(I*(x^2+1)^n)*csgn(I*c*(x^2+1)^n)^2-1/2*I*arctan(x)*P
i*csgn(I*(x^2+1)^n)*csgn(I*c*(x^2+1)^n)*csgn(I*c)-1/2*I*arctan(x)*Pi*csgn(I*c*(x^2+1)^n)^3+1/2*I*arctan(x)*Pi*
csgn(I*c*(x^2+1)^n)^2*csgn(I*c)+arctan(x)*ln(c)

________________________________________________________________________________________

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]

integrate(log(c*(x^2+1)^n)/(x^2+1),x, algorithm="maxima")

[Out]

integrate(log((x^2 + 1)^n*c)/(x^2 + 1), x)

________________________________________________________________________________________

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]

int(log(c*(x^2 + 1)^n)/(x^2 + 1),x)

[Out]

int(log(c*(x^2 + 1)^n)/(x^2 + 1), x)

________________________________________________________________________________________

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]

integrate(ln(c*(x**2+1)**n)/(x**2+1),x)

[Out]

Integral(log(c*(x**2 + 1)**n)/(x**2 + 1), x)

________________________________________________________________________________________