3.92.6 \(\int \frac {2 x^2}{-x+x^3} \, dx\)

Optimal. Leaf size=6 \[ \log \left (-1+x^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 8, normalized size of antiderivative = 1.33, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {12, 1584, 260} \begin {gather*} \log \left (1-x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[1 - 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 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 1584

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=2 \int \frac {x^2}{-x+x^3} \, dx\\ &=2 \int \frac {x}{-1+x^2} \, dx\\ &=\log \left (1-x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 6, normalized size = 1.00 \begin {gather*} \log \left (-1+x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[-1 + x^2]

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 6, normalized size = 1.00 \begin {gather*} \log \left (x^{2} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*exp(log(x^2/exp(x))+x)/(x*exp(log(x^2/exp(x))+x)-x),x, algorithm="fricas")

[Out]

log(x^2 - 1)

________________________________________________________________________________________

giac [A]  time = 0.21, size = 11, normalized size = 1.83 \begin {gather*} \log \left ({\left | x + 1 \right |}\right ) + \log \left ({\left | x - 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*exp(log(x^2/exp(x))+x)/(x*exp(log(x^2/exp(x))+x)-x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.11, size = 10, normalized size = 1.67




method result size



norman \(\ln \left (x -1\right )+\ln \left (x +1\right )\) \(10\)
default \(\ln \left (x^{2} {\mathrm e}^{x +\ln \left (x^{2} {\mathrm e}^{-x}\right )-2 \ln \relax (x )}-1\right )\) \(24\)
risch \(\ln \left ({\mathrm e}^{x}\right )+\frac {i \pi \,\mathrm {csgn}\left (i x^{2}\right ) \left (-\mathrm {csgn}\left (i x^{2}\right )+\mathrm {csgn}\left (i x \right )\right )^{2}}{2}+\frac {i \pi \,\mathrm {csgn}\left (i x^{2} {\mathrm e}^{-x}\right ) \left (-\mathrm {csgn}\left (i x^{2} {\mathrm e}^{-x}\right )+\mathrm {csgn}\left (i x^{2}\right )\right ) \left (-\mathrm {csgn}\left (i x^{2} {\mathrm e}^{-x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{-x}\right )\right )}{2}-x +\ln \left (x^{2} {\mathrm e}^{-\frac {i \pi \left (\mathrm {csgn}\left (i x^{2}\right )^{3}-2 \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}+\mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (i x \right )^{2}-\mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (i x^{2} {\mathrm e}^{-x}\right )^{2}+\mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (i x^{2} {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x}\right )+\mathrm {csgn}\left (i x^{2} {\mathrm e}^{-x}\right )^{3}-\mathrm {csgn}\left (i x^{2} {\mathrm e}^{-x}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{-x}\right )\right )}{2}}-1\right )\) \(232\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*exp(ln(x^2/exp(x))+x)/(x*exp(ln(x^2/exp(x))+x)-x),x,method=_RETURNVERBOSE)

[Out]

ln(x-1)+ln(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 9, normalized size = 1.50 \begin {gather*} \log \left (x + 1\right ) + \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*exp(log(x^2/exp(x))+x)/(x*exp(log(x^2/exp(x))+x)-x),x, algorithm="maxima")

[Out]

log(x + 1) + log(x - 1)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 9, normalized size = 1.50 \begin {gather*} \ln \left (x-1\right )+\ln \left (x+1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(2*exp(x + log(x^2*exp(-x))))/(x - x*exp(x + log(x^2*exp(-x)))),x)

[Out]

log(x - 1) + log(x + 1)

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 5, normalized size = 0.83 \begin {gather*} \log {\left (x^{2} - 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*exp(ln(x**2/exp(x))+x)/(x*exp(ln(x**2/exp(x))+x)-x),x)

[Out]

log(x**2 - 1)

________________________________________________________________________________________