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

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

[Out]

1/x-arctanh(x)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {1607, 331, 213} \begin {gather*} \frac {1}{x}-\tanh ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^(-1) - ArcTanh[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])

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(22\) vs. \(2(8)=16\).
time = 0.00, size = 22, normalized size = 2.75 \begin {gather*} \frac {1}{x}+\frac {1}{2} \log (1-x)-\frac {1}{2} \log (1+x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(22\) vs. \(2(8)=16\).
time = 1.79, size = 20, normalized size = 2.50 \begin {gather*} \frac {2+x \left (\text {Log}\left [-1+x\right ]-\text {Log}\left [1+x\right ]\right )}{2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 17, normalized size = 2.12

method result size
meijerg \(-\frac {i \left (\frac {2 i}{x}-2 i \arctanh \left (x \right )\right )}{2}\) \(16\)
default \(\frac {1}{x}+\frac {\ln \left (-1+x \right )}{2}-\frac {\ln \left (1+x \right )}{2}\) \(17\)
norman \(\frac {1}{x}+\frac {\ln \left (-1+x \right )}{2}-\frac {\ln \left (1+x \right )}{2}\) \(17\)
risch \(\frac {1}{x}+\frac {\ln \left (-1+x \right )}{2}-\frac {\ln \left (1+x \right )}{2}\) \(17\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.25, size = 16, normalized size = 2.00 \begin {gather*} \frac {1}{x} - \frac {1}{2} \, \log \left (x + 1\right ) + \frac {1}{2} \, \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 20 vs. \(2 (8) = 16\).
time = 0.32, size = 20, normalized size = 2.50 \begin {gather*} -\frac {x \log \left (x + 1\right ) - x \log \left (x - 1\right ) - 2}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 15 vs. \(2 (5) = 10\)
time = 0.05, size = 15, normalized size = 1.88 \begin {gather*} \frac {\log {\left (x - 1 \right )}}{2} - \frac {\log {\left (x + 1 \right )}}{2} + \frac {1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 18 vs. \(2 (8) = 16\).
time = 0.00, size = 20, normalized size = 2.50 \begin {gather*} \frac {\ln \left |x-1\right |}{2}-\frac {\ln \left |x+1\right |}{2}+\frac 1{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.17, size = 8, normalized size = 1.00 \begin {gather*} \frac {1}{x}-\mathrm {atanh}\left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/x - atanh(x)

________________________________________________________________________________________