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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 26 \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=5-x \left (-2 x+x^2\right )+4 \log (5)-\log \left ((5-x)^2\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.73, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {1864} \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=-x^3+2 x^2-2 \log (5-x) \]

[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 1864

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{align*} \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{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=75+2 x^2-x^3-2 \log (5-x) \]

[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]

Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.69

method result size
default \(-x^{3}+2 x^{2}-2 \ln \left (-5+x \right )\) \(18\)
norman \(-x^{3}+2 x^{2}-2 \ln \left (-5+x \right )\) \(18\)
risch \(-x^{3}+2 x^{2}-2 \ln \left (-5+x \right )\) \(18\)
parallelrisch \(-x^{3}+2 x^{2}-2 \ln \left (-5+x \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\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.65 \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=-x^{3} + 2 \, x^{2} - 2 \, \log \left (x - 5\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.54 \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=- x^{3} + 2 x^{2} - 2 \log {\left (x - 5 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.65 \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=-x^{3} + 2 \, x^{2} - 2 \, \log \left (x - 5\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.69 \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=-x^{3} + 2 \, x^{2} - 2 \, \log \left ({\left | x - 5 \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.04 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.65 \[ \int \frac {-2-20 x+19 x^2-3 x^3}{-5+x} \, dx=2\,x^2-2\,\ln \left (x-5\right )-x^3 \]

[In]

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

[Out]

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