3.276 $$\int \frac{\log (\frac{1-x^2}{1+x^2})}{(1+x)^2} \, dx$$

Optimal. Leaf size=57 $\frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{x^2+1}\right )}{x+1}-\frac{1}{2} \log \left (x^2+1\right )-\frac{1}{x+1}-\tan ^{-1}(x)$

[Out]

-(1 + x)^(-1) - ArcTan[x] + Log[1 - x^2]/2 - Log[(1 - x^2)/(1 + x^2)]/(1 + x) - Log[1 + x^2]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0569428, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 22, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.273, Rules used = {2525, 12, 2074, 260, 635, 203} $\frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{x^2+1}\right )}{x+1}-\frac{1}{2} \log \left (x^2+1\right )-\frac{1}{x+1}-\tan ^{-1}(x)$

Antiderivative was successfully veriﬁed.

[In]

Int[Log[(1 - x^2)/(1 + x^2)]/(1 + x)^2,x]

[Out]

-(1 + x)^(-1) - ArcTan[x] + Log[1 - x^2]/2 - Log[(1 - x^2)/(1 + x^2)]/(1 + x) - Log[1 + x^2]/2

Rule 2525

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Simp[((d + e*x)^(m
+ 1)*(a + b*Log[c*RFx^p])^n)/(e*(m + 1)), x] - Dist[(b*n*p)/(e*(m + 1)), Int[SimplifyIntegrand[((d + e*x)^(m +
1)*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && RationalFunc
tionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

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

Rubi steps

\begin{align*} \int \frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{(1+x)^2} \, dx &=-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+\int \frac{4 x}{-1-x+x^4+x^5} \, dx\\ &=-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+4 \int \frac{x}{-1-x+x^4+x^5} \, dx\\ &=-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+4 \int \left (\frac{1}{4 (1+x)^2}+\frac{x}{4 \left (-1+x^2\right )}+\frac{-1-x}{4 \left (1+x^2\right )}\right ) \, dx\\ &=-\frac{1}{1+x}-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+\int \frac{x}{-1+x^2} \, dx+\int \frac{-1-x}{1+x^2} \, dx\\ &=-\frac{1}{1+x}+\frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}-\int \frac{1}{1+x^2} \, dx-\int \frac{x}{1+x^2} \, dx\\ &=-\frac{1}{1+x}-\tan ^{-1}(x)+\frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}-\frac{1}{2} \log \left (1+x^2\right )\\ \end{align*}

Mathematica [C]  time = 0.0461456, size = 60, normalized size = 1.05 $\frac{1}{2} \left (\log \left (1-x^2\right )-\frac{2 \left (\log \left (\frac{1-x^2}{x^2+1}\right )+1\right )}{x+1}+(-1+i) \log (-x+i)-(1+i) \log (x+i)\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Log[(1 - x^2)/(1 + x^2)]/(1 + x)^2,x]

[Out]

((-1 + I)*Log[I - x] - (1 + I)*Log[I + x] + Log[1 - x^2] - (2*(1 + Log[(1 - x^2)/(1 + x^2)]))/(1 + x))/2

________________________________________________________________________________________

Maple [C]  time = 0.033, size = 112, normalized size = 2. \begin{align*} -{\frac{1}{1+x}\ln \left ({\frac{-{x}^{2}+1}{{x}^{2}+1}} \right ) }+{\frac{i\ln \left ( x-i \right ) x-i\ln \left ( x+i \right ) x+i\ln \left ( x-i \right ) -i\ln \left ( x+i \right ) -\ln \left ( x-i \right ) x-\ln \left ( x+i \right ) x+\ln \left ({x}^{2}-1 \right ) x-\ln \left ( x-i \right ) -\ln \left ( x+i \right ) +\ln \left ({x}^{2}-1 \right ) -2}{2+2\,x}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(ln((-x^2+1)/(x^2+1))/(1+x)^2,x)

[Out]

-ln((-x^2+1)/(x^2+1))/(1+x)+1/2*(I*ln(x-I)*x-I*ln(x+I)*x+I*ln(x-I)-I*ln(x+I)-ln(x-I)*x-ln(x+I)*x+ln(x^2-1)*x-l
n(x-I)-ln(x+I)+ln(x^2-1)-2)/(1+x)

________________________________________________________________________________________

Maxima [A]  time = 1.58296, size = 73, normalized size = 1.28 \begin{align*} -\frac{\log \left (-\frac{x^{2} - 1}{x^{2} + 1}\right )}{x + 1} - \frac{1}{x + 1} - \arctan \left (x\right ) - \frac{1}{2} \, \log \left (x^{2} + 1\right ) + \frac{1}{2} \, \log \left (x + 1\right ) + \frac{1}{2} \, \log \left (x - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((-x^2+1)/(x^2+1))/(1+x)^2,x, algorithm="maxima")

[Out]

-log(-(x^2 - 1)/(x^2 + 1))/(x + 1) - 1/(x + 1) - arctan(x) - 1/2*log(x^2 + 1) + 1/2*log(x + 1) + 1/2*log(x - 1
)

________________________________________________________________________________________

Fricas [A]  time = 2.11034, size = 157, normalized size = 2.75 \begin{align*} -\frac{2 \,{\left (x + 1\right )} \arctan \left (x\right ) +{\left (x + 1\right )} \log \left (x^{2} + 1\right ) -{\left (x + 1\right )} \log \left (x^{2} - 1\right ) + 2 \, \log \left (-\frac{x^{2} - 1}{x^{2} + 1}\right ) + 2}{2 \,{\left (x + 1\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((-x^2+1)/(x^2+1))/(1+x)^2,x, algorithm="fricas")

[Out]

-1/2*(2*(x + 1)*arctan(x) + (x + 1)*log(x^2 + 1) - (x + 1)*log(x^2 - 1) + 2*log(-(x^2 - 1)/(x^2 + 1)) + 2)/(x
+ 1)

________________________________________________________________________________________

Sympy [A]  time = 0.194229, size = 41, normalized size = 0.72 \begin{align*} \frac{\log{\left (x^{2} - 1 \right )}}{2} - \frac{\log{\left (x^{2} + 1 \right )}}{2} - \operatorname{atan}{\left (x \right )} - \frac{4}{4 x + 4} - \frac{\log{\left (\frac{1 - x^{2}}{x^{2} + 1} \right )}}{x + 1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln((-x**2+1)/(x**2+1))/(1+x)**2,x)

[Out]

log(x**2 - 1)/2 - log(x**2 + 1)/2 - atan(x) - 4/(4*x + 4) - log((1 - x**2)/(x**2 + 1))/(x + 1)

________________________________________________________________________________________

Giac [A]  time = 1.37203, size = 76, normalized size = 1.33 \begin{align*} -\frac{\log \left (-\frac{x^{2} - 1}{x^{2} + 1}\right )}{x + 1} - \frac{1}{x + 1} - \arctan \left (x\right ) - \frac{1}{2} \, \log \left (x^{2} + 1\right ) + \frac{1}{2} \, \log \left ({\left | x + 1 \right |}\right ) + \frac{1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((-x^2+1)/(x^2+1))/(1+x)^2,x, algorithm="giac")

[Out]

-log(-(x^2 - 1)/(x^2 + 1))/(x + 1) - 1/(x + 1) - arctan(x) - 1/2*log(x^2 + 1) + 1/2*log(abs(x + 1)) + 1/2*log(
abs(x - 1))