3.95.4 \(\int \frac {-96+32 x+x^2}{-3 x^2+x^3} \, dx\)

Optimal. Leaf size=12 \[ -\frac {32}{x}+\log (3-x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1593, 893} \begin {gather*} \log (3-x)-\frac {32}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-32/x + Log[3 - x]

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

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 {gather*} \begin {aligned} \text {integral} &=\int \frac {-96+32 x+x^2}{(-3+x) x^2} \, dx\\ &=\int \left (\frac {1}{-3+x}+\frac {32}{x^2}\right ) \, dx\\ &=-\frac {32}{x}+\log (3-x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 12, normalized size = 1.00 \begin {gather*} -\frac {32}{x}+\log (3-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-32/x + Log[3 - x]

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 12, normalized size = 1.00 \begin {gather*} \frac {x \log \left (x - 3\right ) - 32}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+32*x-96)/(x^3-3*x^2),x, algorithm="fricas")

[Out]

(x*log(x - 3) - 32)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+32*x-96)/(x^3-3*x^2),x, algorithm="giac")

[Out]

-32/x + log(abs(x - 3))

________________________________________________________________________________________

maple [A]  time = 0.60, size = 11, normalized size = 0.92




method result size



default \(\ln \left (x -3\right )-\frac {32}{x}\) \(11\)
norman \(\ln \left (x -3\right )-\frac {32}{x}\) \(11\)
risch \(\ln \left (x -3\right )-\frac {32}{x}\) \(11\)
meijerg \(-\frac {32}{x}+\ln \left (1-\frac {x}{3}\right )\) \(13\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+32*x-96)/(x^3-3*x^2),x,method=_RETURNVERBOSE)

[Out]

ln(x-3)-32/x

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 10, normalized size = 0.83 \begin {gather*} -\frac {32}{x} + \log \left (x - 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+32*x-96)/(x^3-3*x^2),x, algorithm="maxima")

[Out]

-32/x + log(x - 3)

________________________________________________________________________________________

mupad [B]  time = 7.23, size = 10, normalized size = 0.83 \begin {gather*} \ln \left (x-3\right )-\frac {32}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(32*x + x^2 - 96)/(3*x^2 - x^3),x)

[Out]

log(x - 3) - 32/x

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 7, normalized size = 0.58 \begin {gather*} \log {\left (x - 3 \right )} - \frac {32}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+32*x-96)/(x**3-3*x**2),x)

[Out]

log(x - 3) - 32/x

________________________________________________________________________________________