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

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]

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)]

________________________________________________________________________________________

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]

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 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 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]

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 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 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]

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]

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)]

________________________________________________________________________________________

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]

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^2+1)*ln(x-I)+1/4*I*n*ln(x-I)^2+1/2*I*n*ln(x-I)*ln(-
1/2*I*(x+I))+1/2*I*n*dilog(-1/2*I*(x+I))+1/2*I*n*ln(x^2+1)*ln(x+I)-1/4*I*n*ln(x+I)^2-1/2*I*n*ln(x+I)*ln(1/2*I*
(x-I))-1/2*I*n*dilog(1/2*I*(x-I))-1/2*I*arctan(x)*Pi*csgn(I*c)*csgn(I*(x^2+1)^n)*csgn(I*c*(x^2+1)^n)+1/2*I*arc
tan(x)*Pi*csgn(I*c)*csgn(I*c*(x^2+1)^n)^2+1/2*I*arctan(x)*Pi*csgn(I*(x^2+1)^n)*csgn(I*c*(x^2+1)^n)^2-1/2*I*arc
tan(x)*Pi*csgn(I*c*(x^2+1)^n)^3+arctan(x)*ln(c)

________________________________________________________________________________________

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]

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)

________________________________________________________________________________________

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]

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)

________________________________________________________________________________________

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]

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

[Out]

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

________________________________________________________________________________________

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]

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)