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

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

[Out]

2*arctanh(x^2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {12, 281, 212} \[ \int \frac {4 x}{1-x^4} \, dx=2 \text {arctanh}\left (x^2\right ) \]

[In]

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

[Out]

2*ArcTanh[x^2]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 281

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = GCD[m + 1, n]}, Dist[1/k, Subst[Int[x^((m
 + 1)/k - 1)*(a + b*x^(n/k))^p, x], x, x^k], x] /; k != 1] /; FreeQ[{a, b, p}, x] && IGtQ[n, 0] && IntegerQ[m]

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

Mathematica [B] (verified)

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

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

[In]

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

[Out]

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

Maple [A] (verified)

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

method result size
meijerg \(2 \,\operatorname {arctanh}\left (x^{2}\right )\) \(7\)
risch \(\ln \left (x^{2}+1\right )-\ln \left (x^{2}-1\right )\) \(16\)
default \(-\ln \left (-1+x \right )-\ln \left (1+x \right )+\ln \left (x^{2}+1\right )\) \(20\)
norman \(-\ln \left (-1+x \right )-\ln \left (1+x \right )+\ln \left (x^{2}+1\right )\) \(20\)
parallelrisch \(-\ln \left (-1+x \right )-\ln \left (1+x \right )+\ln \left (x^{2}+1\right )\) \(20\)

[In]

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

[Out]

2*arctanh(x^2)

Fricas [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

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

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

[In]

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

[Out]

log(x^2 + 1) - log(abs(x^2 - 1))

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

2*atanh(x^2)