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

   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 = 11, antiderivative size = 6 \[ \int \frac {2}{-1+4 x^2} \, dx=-\text {arctanh}(2 x) \]

[Out]

-arctanh(2*x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 6, 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 = {12, 213} \[ \int \frac {2}{-1+4 x^2} \, dx=-\text {arctanh}(2 x) \]

[In]

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

[Out]

-ArcTanh[2*x]

Rule 12

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

Rule 213

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

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

Mathematica [B] (verified)

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

Time = 0.00 (sec) , antiderivative size = 23, normalized size of antiderivative = 3.83 \[ \int \frac {2}{-1+4 x^2} \, dx=2 \left (\frac {1}{4} \log (1-2 x)-\frac {1}{4} \log (1+2 x)\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.77 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.17

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

[In]

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

[Out]

-arctanh(2*x)

Fricas [B] (verification not implemented)

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

Time = 0.33 (sec) , antiderivative size = 17, normalized size of antiderivative = 2.83 \[ \int \frac {2}{-1+4 x^2} \, dx=-\frac {1}{2} \, \log \left (2 \, x + 1\right ) + \frac {1}{2} \, \log \left (2 \, x - 1\right ) \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

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

Time = 0.18 (sec) , antiderivative size = 17, normalized size of antiderivative = 2.83 \[ \int \frac {2}{-1+4 x^2} \, dx=-\frac {1}{2} \, \log \left (2 \, x + 1\right ) + \frac {1}{2} \, \log \left (2 \, x - 1\right ) \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

-atanh(2*x)