3.59.37 \(\int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx\)

Optimal. Leaf size=26 \[ 5-x \left (-2 x+x^2\right )+4 \log (5)-\log \left ((5-x)^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 19, normalized size of antiderivative = 0.73, number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {1850} \begin {gather*} -x^3+2 x^2-2 \log (5-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*x^2 - x^3 - 2*Log[5 - x]

Rule 1850

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 20, normalized size = 0.77 \begin {gather*} 75+2 x^2-x^3-2 \log (5-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

75 + 2*x^2 - x^3 - 2*Log[5 - x]

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 17, normalized size = 0.65 \begin {gather*} -x^{3} + 2 \, x^{2} - 2 \, \log \left (x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*x^3+19*x^2-20*x-2)/(x-5),x, algorithm="fricas")

[Out]

-x^3 + 2*x^2 - 2*log(x - 5)

________________________________________________________________________________________

giac [A]  time = 0.22, size = 18, normalized size = 0.69 \begin {gather*} -x^{3} + 2 \, x^{2} - 2 \, \log \left ({\left | x - 5 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*x^3+19*x^2-20*x-2)/(x-5),x, algorithm="giac")

[Out]

-x^3 + 2*x^2 - 2*log(abs(x - 5))

________________________________________________________________________________________

maple [A]  time = 0.30, size = 18, normalized size = 0.69




method result size



default \(-x^{3}+2 x^{2}-2 \ln \left (x -5\right )\) \(18\)
norman \(-x^{3}+2 x^{2}-2 \ln \left (x -5\right )\) \(18\)
risch \(-x^{3}+2 x^{2}-2 \ln \left (x -5\right )\) \(18\)
meijerg \(-2 \ln \left (1-\frac {x}{5}\right )-\frac {25 x \left (\frac {4}{25} x^{2}+\frac {6}{5} x +12\right )}{4}+\frac {95 x \left (\frac {3 x}{5}+6\right )}{6}-20 x\) \(34\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-3*x^3+19*x^2-20*x-2)/(x-5),x,method=_RETURNVERBOSE)

[Out]

-x^3+2*x^2-2*ln(x-5)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 17, normalized size = 0.65 \begin {gather*} -x^{3} + 2 \, x^{2} - 2 \, \log \left (x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*x^3+19*x^2-20*x-2)/(x-5),x, algorithm="maxima")

[Out]

-x^3 + 2*x^2 - 2*log(x - 5)

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 17, normalized size = 0.65 \begin {gather*} 2\,x^2-2\,\ln \left (x-5\right )-x^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(20*x - 19*x^2 + 3*x^3 + 2)/(x - 5),x)

[Out]

2*x^2 - 2*log(x - 5) - x^3

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 14, normalized size = 0.54 \begin {gather*} - x^{3} + 2 x^{2} - 2 \log {\left (x - 5 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*x**3+19*x**2-20*x-2)/(x-5),x)

[Out]

-x**3 + 2*x**2 - 2*log(x - 5)

________________________________________________________________________________________