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

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (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 = 9, antiderivative size = 2 \[ \int \frac {1}{1-x^2} \, dx=\text {arctanh}(x) \]

[Out]

arctanh(x)

Rubi [A] (verified)

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

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \text {arctanh}(x) \\ \end{align*}

Mathematica [B] (verified)

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

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 3, normalized size of antiderivative = 1.50

method result size
default \(\operatorname {arctanh}\left (x \right )\) \(3\)
meijerg \(\operatorname {arctanh}\left (x \right )\) \(3\)
norman \(-\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(14\)
risch \(-\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(14\)
parallelrisch \(-\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(14\)

[In]

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

[Out]

arctanh(x)

Fricas [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

atanh(x)