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

Optimal. Leaf size=19 \[ \frac {1}{4} \log \left (2-x^2\right )+\frac {\log (x)}{2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1593, 446, 72} \[ \frac {1}{4} \log \left (2-x^2\right )+\frac {\log (x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[x]/2 + Log[2 - x^2]/4

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 1593

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}{-2 x+x^3} \, dx &=\int \frac {-1+x^2}{x \left (-2+x^2\right )} \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {-1+x}{(-2+x) x} \, dx,x,x^2\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {1}{2 (-2+x)}+\frac {1}{2 x}\right ) \, dx,x,x^2\right )\\ &=\frac {\log (x)}{2}+\frac {1}{4} \log \left (2-x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 19, normalized size = 1.00 \[ \frac {1}{4} \log \left (2-x^2\right )+\frac {\log (x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[x]/2 + Log[2 - x^2]/4

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 13, normalized size = 0.68 \[ \frac {1}{4} \, \log \left (x^{2} - 2\right ) + \frac {1}{2} \, \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.31, size = 16, normalized size = 0.84 \[ \frac {1}{4} \, \log \left (x^{2}\right ) + \frac {1}{4} \, \log \left ({\left | x^{2} - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.01, size = 14, normalized size = 0.74 \[ \frac {\ln \relax (x )}{2}+\frac {\ln \left (x^{2}-2\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.66, size = 13, normalized size = 0.68 \[ \frac {1}{4} \, \log \left (x^{2} - 2\right ) + \frac {1}{2} \, \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.34, size = 13, normalized size = 0.68 \[ \frac {\ln \left (x^2-2\right )}{4}+\frac {\ln \relax (x)}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x^2 - 2)/4 + log(x)/2

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 12, normalized size = 0.63 \[ \frac {\log {\relax (x )}}{2} + \frac {\log {\left (x^{2} - 2 \right )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________