3.95 \(\int \frac{1}{1-(1+x)^2} \, dx\)

Optimal. Leaf size=4 \[ \tanh ^{-1}(x+1) \]

[Out]

ArcTanh[1 + x]

________________________________________________________________________________________

Rubi [A]  time = 0.0018798, antiderivative size = 4, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {247, 206} \[ \tanh ^{-1}(x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTanh[1 + x]

Rule 247

Int[((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[1/Coefficient[v, x, 1], Subst[Int[(a + b*x^n)^p, x], x,
v], x] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && NeQ[v, x]

Rule 206

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

Rubi steps

\begin{align*} \int \frac{1}{1-(1+x)^2} \, dx &=\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,1+x\right )\\ &=\tanh ^{-1}(1+x)\\ \end{align*}

Mathematica [B]  time = 0.0021521, size = 15, normalized size = 3.75 \[ \frac{1}{2} \log (x+2)-\frac{\log (x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Log[x]/2 + Log[2 + x]/2

________________________________________________________________________________________

Maple [B]  time = 0.005, size = 12, normalized size = 3. \begin{align*} -{\frac{\ln \left ( x \right ) }{2}}+{\frac{\ln \left ( 2+x \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.00659, size = 15, normalized size = 3.75 \begin{align*} \frac{1}{2} \, \log \left (x + 2\right ) - \frac{1}{2} \, \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.66796, size = 39, normalized size = 9.75 \begin{align*} \frac{1}{2} \, \log \left (x + 2\right ) - \frac{1}{2} \, \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.093003, size = 10, normalized size = 2.5 \begin{align*} - \frac{\log{\left (x \right )}}{2} + \frac{\log{\left (x + 2 \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x)/2 + log(x + 2)/2

________________________________________________________________________________________

Giac [B]  time = 1.11716, size = 18, normalized size = 4.5 \begin{align*} \frac{1}{2} \, \log \left ({\left | x + 2 \right |}\right ) - \frac{1}{2} \, \log \left ({\left | x \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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