\(\int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx\) [7912]

   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 = 32, antiderivative size = 24 \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=x-\frac {e (4+5 (-3+x)+x)}{-5+x}-2 \log (5 x) \]

[Out]

x-2*ln(5*x)-(6*x-11)/(-5+x)*exp(1)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.67, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6, 1608, 27, 1634} \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=x+\frac {19 e}{5-x}-2 \log (x) \]

[In]

Int[(-50 + 45*x + 19*E*x - 12*x^2 + x^3)/(25*x - 10*x^2 + x^3),x]

[Out]

(19*E)/(5 - x) + x - 2*Log[x]

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {-50+(45+19 e) x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx \\ & = \int \frac {-50+(45+19 e) x-12 x^2+x^3}{x \left (25-10 x+x^2\right )} \, dx \\ & = \int \frac {-50+(45+19 e) x-12 x^2+x^3}{(-5+x)^2 x} \, dx \\ & = \int \left (1+\frac {19 e}{(-5+x)^2}-\frac {2}{x}\right ) \, dx \\ & = \frac {19 e}{5-x}+x-2 \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.58 \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=-\frac {19 e}{-5+x}+x-2 \log (x) \]

[In]

Integrate[(-50 + 45*x + 19*E*x - 12*x^2 + x^3)/(25*x - 10*x^2 + x^3),x]

[Out]

(-19*E)/(-5 + x) + x - 2*Log[x]

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.67

method result size
default \(x -2 \ln \left (x \right )-\frac {19 \,{\mathrm e}}{-5+x}\) \(16\)
risch \(x -2 \ln \left (x \right )-\frac {19 \,{\mathrm e}}{-5+x}\) \(16\)
norman \(\frac {x^{2}-25-19 \,{\mathrm e}}{-5+x}-2 \ln \left (x \right )\) \(21\)
parallelrisch \(-\frac {2 x \ln \left (x \right )-x^{2}+25+19 \,{\mathrm e}-10 \ln \left (x \right )}{-5+x}\) \(28\)

[In]

int((19*x*exp(1)+x^3-12*x^2+45*x-50)/(x^3-10*x^2+25*x),x,method=_RETURNVERBOSE)

[Out]

x-2*ln(x)-19*exp(1)/(-5+x)

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=\frac {x^{2} - 2 \, {\left (x - 5\right )} \log \left (x\right ) - 5 \, x - 19 \, e}{x - 5} \]

[In]

integrate((19*x*exp(1)+x^3-12*x^2+45*x-50)/(x^3-10*x^2+25*x),x, algorithm="fricas")

[Out]

(x^2 - 2*(x - 5)*log(x) - 5*x - 19*e)/(x - 5)

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.58 \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=x - 2 \log {\left (x \right )} - \frac {19 e}{x - 5} \]

[In]

integrate((19*x*exp(1)+x**3-12*x**2+45*x-50)/(x**3-10*x**2+25*x),x)

[Out]

x - 2*log(x) - 19*E/(x - 5)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=x - \frac {19 \, e}{x - 5} - 2 \, \log \left (x\right ) \]

[In]

integrate((19*x*exp(1)+x^3-12*x^2+45*x-50)/(x^3-10*x^2+25*x),x, algorithm="maxima")

[Out]

x - 19*e/(x - 5) - 2*log(x)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.67 \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=x - \frac {19 \, e}{x - 5} - 2 \, \log \left ({\left | x \right |}\right ) \]

[In]

integrate((19*x*exp(1)+x^3-12*x^2+45*x-50)/(x^3-10*x^2+25*x),x, algorithm="giac")

[Out]

x - 19*e/(x - 5) - 2*log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {-50+45 x+19 e x-12 x^2+x^3}{25 x-10 x^2+x^3} \, dx=x-2\,\ln \left (x\right )-\frac {19\,\mathrm {e}}{x-5} \]

[In]

int((45*x + 19*x*exp(1) - 12*x^2 + x^3 - 50)/(25*x - 10*x^2 + x^3),x)

[Out]

x - 2*log(x) - (19*exp(1))/(x - 5)