\(\int \frac {1}{1-(1+x)^2} \, dx\) [95]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 4 \[ \int \frac {1}{1-(1+x)^2} \, dx=\text {arctanh}(1+x) \]

[Out]

arctanh(1+x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {253, 212} \[ \int \frac {1}{1-(1+x)^2} \, dx=\text {arctanh}(x+1) \]

[In]

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

[Out]

ArcTanh[1 + x]

Rule 212

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

Rule 253

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]

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(15\) vs. \(2(4)=8\).

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 3.75 \[ \int \frac {1}{1-(1+x)^2} \, dx=-\frac {\log (x)}{2}+\frac {1}{2} \log (2+x) \]

[In]

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

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(11\) vs. \(2(4)=8\).

Time = 0.71 (sec) , antiderivative size = 12, normalized size of antiderivative = 3.00

method result size
default \(-\frac {\ln \left (x \right )}{2}+\frac {\ln \left (x +2\right )}{2}\) \(12\)
norman \(-\frac {\ln \left (x \right )}{2}+\frac {\ln \left (x +2\right )}{2}\) \(12\)
risch \(-\frac {\ln \left (x \right )}{2}+\frac {\ln \left (x +2\right )}{2}\) \(12\)
parallelrisch \(-\frac {\ln \left (x \right )}{2}+\frac {\ln \left (x +2\right )}{2}\) \(12\)
meijerg \(\frac {\ln \left (1+\frac {x}{2}\right )}{2}-\frac {\ln \left (x \right )}{2}+\frac {\ln \left (2\right )}{2}\) \(18\)

[In]

int(1/(1-(x+1)^2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 11 vs. \(2 (4) = 8\).

Time = 0.26 (sec) , antiderivative size = 11, normalized size of antiderivative = 2.75 \[ \int \frac {1}{1-(1+x)^2} \, dx=\frac {1}{2} \, \log \left (x + 2\right ) - \frac {1}{2} \, \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 10 vs. \(2 (3) = 6\).

Time = 0.04 (sec) , antiderivative size = 10, normalized size of antiderivative = 2.50 \[ \int \frac {1}{1-(1+x)^2} \, dx=- \frac {\log {\left (x \right )}}{2} + \frac {\log {\left (x + 2 \right )}}{2} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 11 vs. \(2 (4) = 8\).

Time = 0.20 (sec) , antiderivative size = 11, normalized size of antiderivative = 2.75 \[ \int \frac {1}{1-(1+x)^2} \, dx=\frac {1}{2} \, \log \left (x + 2\right ) - \frac {1}{2} \, \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 13 vs. \(2 (4) = 8\).

Time = 0.30 (sec) , antiderivative size = 13, normalized size of antiderivative = 3.25 \[ \int \frac {1}{1-(1+x)^2} \, dx=\frac {1}{2} \, \log \left ({\left | x + 2 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | x \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00 \[ \int \frac {1}{1-(1+x)^2} \, dx=\mathrm {atanh}\left (x+1\right ) \]

[In]

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

[Out]

atanh(x + 1)