\(\int \frac {25+4 x-2 x^2}{-1+x} \, dx\) [7625]

   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 = 16, antiderivative size = 16 \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=x \left (2-x+\frac {27 \log (-1+x)}{x}\right ) \]

[Out]

(27*ln(-1+x)/x+2-x)*x

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {697} \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=-x^2+2 x+27 \log (1-x) \]

[In]

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

[Out]

2*x - x^2 + 27*Log[1 - x]

Rule 697

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rubi steps \begin{align*} \text {integral}& = \int \left (2+\frac {27}{-1+x}-2 x\right ) \, dx \\ & = 2 x-x^2+27 \log (1-x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=-(-1+x)^2+27 \log (-1+x) \]

[In]

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

[Out]

-(-1 + x)^2 + 27*Log[-1 + x]

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00

method result size
default \(2 x -x^{2}+27 \ln \left (-1+x \right )\) \(16\)
norman \(2 x -x^{2}+27 \ln \left (-1+x \right )\) \(16\)
risch \(2 x -x^{2}+27 \ln \left (-1+x \right )\) \(16\)
parallelrisch \(2 x -x^{2}+27 \ln \left (-1+x \right )\) \(16\)
meijerg \(27 \ln \left (1-x \right )-\frac {x \left (6+3 x \right )}{3}+4 x\) \(21\)

[In]

int((-2*x^2+4*x+25)/(-1+x),x,method=_RETURNVERBOSE)

[Out]

2*x-x^2+27*ln(-1+x)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=-x^{2} + 2 \, x + 27 \, \log \left (x - 1\right ) \]

[In]

integrate((-2*x^2+4*x+25)/(-1+x),x, algorithm="fricas")

[Out]

-x^2 + 2*x + 27*log(x - 1)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=- x^{2} + 2 x + 27 \log {\left (x - 1 \right )} \]

[In]

integrate((-2*x**2+4*x+25)/(-1+x),x)

[Out]

-x**2 + 2*x + 27*log(x - 1)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=-x^{2} + 2 \, x + 27 \, \log \left (x - 1\right ) \]

[In]

integrate((-2*x^2+4*x+25)/(-1+x),x, algorithm="maxima")

[Out]

-x^2 + 2*x + 27*log(x - 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=-x^{2} + 2 \, x + 27 \, \log \left ({\left | x - 1 \right |}\right ) \]

[In]

integrate((-2*x^2+4*x+25)/(-1+x),x, algorithm="giac")

[Out]

-x^2 + 2*x + 27*log(abs(x - 1))

Mupad [B] (verification not implemented)

Time = 12.71 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int \frac {25+4 x-2 x^2}{-1+x} \, dx=2\,x+27\,\ln \left (x-1\right )-x^2 \]

[In]

int((4*x - 2*x^2 + 25)/(x - 1),x)

[Out]

2*x + 27*log(x - 1) - x^2