\(\int \frac {-3125-250 x-5 x^2+e^{3/x} (-1125+705 x+15 x^2)}{625+50 x+x^2} \, dx\) [3276]

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

Optimal result

Integrand size = 39, antiderivative size = 24 \[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=5 \left (1-x+\frac {3 e^{3/x} x^2}{25+x}\right ) \]

[Out]

5+15*x^2*exp(3/x)/(x+25)-5*x

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.54, number of steps used = 20, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.256, Rules used = {27, 6820, 6874, 2237, 2241, 2255, 2240, 2254, 2260, 2209} \[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=15 e^{3/x} x-5 x-375 e^{3/x}+\frac {9375 e^{3/x}}{x+25} \]

[In]

Int[(-3125 - 250*x - 5*x^2 + E^(3/x)*(-1125 + 705*x + 15*x^2))/(625 + 50*x + x^2),x]

[Out]

-375*E^(3/x) - 5*x + 15*E^(3/x)*x + (9375*E^(3/x))/(25 + 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 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2237

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_)), x_Symbol] :> Simp[(c + d*x)*(F^(a + b*(c + d*x)^n)/d), x]
- Dist[b*n*Log[F], Int[(c + d*x)^n*F^(a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2/n]
 && ILtQ[n, 0]

Rule 2240

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^n*(
F^(a + b*(c + d*x)^n)/(b*f*n*(c + d*x)^n*Log[F])), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rule 2241

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> Simp[F^a*(ExpIntegralEi[
b*(c + d*x)^n*Log[F]]/(f*n)), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[d*e - c*f, 0]

Rule 2254

Int[(F_)^((a_.) + (b_.)/((c_.) + (d_.)*(x_)))/((e_.) + (f_.)*(x_)), x_Symbol] :> Dist[d/f, Int[F^(a + b/(c + d
*x))/(c + d*x), x], x] - Dist[(d*e - c*f)/f, Int[F^(a + b/(c + d*x))/((c + d*x)*(e + f*x)), x], x] /; FreeQ[{F
, a, b, c, d, e, f}, x] && NeQ[d*e - c*f, 0]

Rule 2255

Int[(F_)^((a_.) + (b_.)/((c_.) + (d_.)*(x_)))*((e_.) + (f_.)*(x_))^(m_), x_Symbol] :> Simp[(e + f*x)^(m + 1)*(
F^(a + b/(c + d*x))/(f*(m + 1))), x] + Dist[b*d*(Log[F]/(f*(m + 1))), Int[(e + f*x)^(m + 1)*(F^(a + b/(c + d*x
))/(c + d*x)^2), x], x] /; FreeQ[{F, a, b, c, d, e, f}, x] && NeQ[d*e - c*f, 0] && ILtQ[m, -1]

Rule 2260

Int[(F_)^((a_.) + (b_.)/((c_.) + (d_.)*(x_)))/(((e_.) + (f_.)*(x_))*((g_.) + (h_.)*(x_))), x_Symbol] :> Dist[-
d/(f*(d*g - c*h)), Subst[Int[F^(a - b*(h/(d*g - c*h)) + d*b*(x/(d*g - c*h)))/x, x], x, (g + h*x)/(c + d*x)], x
] /; FreeQ[{F, a, b, c, d, e, f}, x] && EqQ[d*e - c*f, 0]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{(25+x)^2} \, dx \\ & = \int \left (-5+\frac {15 e^{3/x} \left (-75+47 x+x^2\right )}{(25+x)^2}\right ) \, dx \\ & = -5 x+15 \int \frac {e^{3/x} \left (-75+47 x+x^2\right )}{(25+x)^2} \, dx \\ & = -5 x+15 \int \left (e^{3/x}-\frac {625 e^{3/x}}{(25+x)^2}-\frac {3 e^{3/x}}{25+x}\right ) \, dx \\ & = -5 x+15 \int e^{3/x} \, dx-45 \int \frac {e^{3/x}}{25+x} \, dx-9375 \int \frac {e^{3/x}}{(25+x)^2} \, dx \\ & = -5 x+15 e^{3/x} x+\frac {9375 e^{3/x}}{25+x}+1125 \int \frac {e^{3/x}}{x (25+x)} \, dx+28125 \int \frac {e^{3/x}}{x^2 (25+x)} \, dx \\ & = -5 x+15 e^{3/x} x+\frac {9375 e^{3/x}}{25+x}-45 \text {Subst}\left (\int \frac {e^{-\frac {3}{25}+\frac {3 x}{25}}}{x} \, dx,x,\frac {25+x}{x}\right )+28125 \int \left (\frac {e^{3/x}}{25 x^2}-\frac {e^{3/x}}{625 x}+\frac {e^{3/x}}{625 (25+x)}\right ) \, dx \\ & = -5 x+15 e^{3/x} x+\frac {9375 e^{3/x}}{25+x}-\frac {45 \text {Ei}\left (\frac {3}{25}+\frac {3}{x}\right )}{e^{3/25}}-45 \int \frac {e^{3/x}}{x} \, dx+45 \int \frac {e^{3/x}}{25+x} \, dx+1125 \int \frac {e^{3/x}}{x^2} \, dx \\ & = -375 e^{3/x}-5 x+15 e^{3/x} x+\frac {9375 e^{3/x}}{25+x}-\frac {45 \text {Ei}\left (\frac {3}{25}+\frac {3}{x}\right )}{e^{3/25}}+45 \text {Ei}\left (\frac {3}{x}\right )+45 \int \frac {e^{3/x}}{x} \, dx-1125 \int \frac {e^{3/x}}{x (25+x)} \, dx \\ & = -375 e^{3/x}-5 x+15 e^{3/x} x+\frac {9375 e^{3/x}}{25+x}-\frac {45 \text {Ei}\left (\frac {3}{25}+\frac {3}{x}\right )}{e^{3/25}}+45 \text {Subst}\left (\int \frac {e^{-\frac {3}{25}+\frac {3 x}{25}}}{x} \, dx,x,\frac {25+x}{x}\right ) \\ & = -375 e^{3/x}-5 x+15 e^{3/x} x+\frac {9375 e^{3/x}}{25+x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=-5 x+15 e^{3/x} \left (-25+x+\frac {625}{25+x}\right ) \]

[In]

Integrate[(-3125 - 250*x - 5*x^2 + E^(3/x)*(-1125 + 705*x + 15*x^2))/(625 + 50*x + x^2),x]

[Out]

-5*x + 15*E^(3/x)*(-25 + x + 625/(25 + x))

Maple [A] (verified)

Time = 4.52 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88

method result size
risch \(-5 x +\frac {15 x^{2} {\mathrm e}^{\frac {3}{x}}}{x +25}\) \(21\)
norman \(\frac {-5 x^{2}+15 x^{2} {\mathrm e}^{\frac {3}{x}}+3125}{x +25}\) \(25\)
parallelrisch \(\frac {-5 x^{2}+15 x^{2} {\mathrm e}^{\frac {3}{x}}+3125}{x +25}\) \(25\)
derivativedivides \(-5 x -\frac {45 \,{\mathrm e}^{\frac {3}{x}}}{\frac {3}{x}+\frac {3}{25}}+15 x \,{\mathrm e}^{\frac {3}{x}}\) \(31\)
default \(-5 x -\frac {45 \,{\mathrm e}^{\frac {3}{x}}}{\frac {3}{x}+\frac {3}{25}}+15 x \,{\mathrm e}^{\frac {3}{x}}\) \(31\)
parts \(-5 x -\frac {45 \,{\mathrm e}^{\frac {3}{x}}}{\frac {3}{x}+\frac {3}{25}}+15 x \,{\mathrm e}^{\frac {3}{x}}\) \(31\)

[In]

int(((15*x^2+705*x-1125)*exp(3/x)-5*x^2-250*x-3125)/(x^2+50*x+625),x,method=_RETURNVERBOSE)

[Out]

-5*x+15*x^2*exp(3/x)/(x+25)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12 \[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=\frac {5 \, {\left (3 \, x^{2} e^{\frac {3}{x}} - x^{2} - 25 \, x\right )}}{x + 25} \]

[In]

integrate(((15*x^2+705*x-1125)*exp(3/x)-5*x^2-250*x-3125)/(x^2+50*x+625),x, algorithm="fricas")

[Out]

5*(3*x^2*e^(3/x) - x^2 - 25*x)/(x + 25)

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=\frac {15 x^{2} e^{\frac {3}{x}}}{x + 25} - 5 x \]

[In]

integrate(((15*x**2+705*x-1125)*exp(3/x)-5*x**2-250*x-3125)/(x**2+50*x+625),x)

[Out]

15*x**2*exp(3/x)/(x + 25) - 5*x

Maxima [F]

\[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=\int { -\frac {5 \, {\left (x^{2} - 3 \, {\left (x^{2} + 47 \, x - 75\right )} e^{\frac {3}{x}} + 50 \, x + 625\right )}}{x^{2} + 50 \, x + 625} \,d x } \]

[In]

integrate(((15*x^2+705*x-1125)*exp(3/x)-5*x^2-250*x-3125)/(x^2+50*x+625),x, algorithm="maxima")

[Out]

-5*x + 15*(x^3 - 1175*x)*e^(3/x)/(x^2 + 50*x + 625) + 5*integrate(75*(959*x - 3525)*e^(3/x)/(x^4 + 75*x^3 + 18
75*x^2 + 15625*x), x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.17 \[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=-\frac {5 \, {\left (\frac {25}{x} - 3 \, e^{\frac {3}{x}} + 1\right )}}{\frac {1}{x} + \frac {25}{x^{2}}} \]

[In]

integrate(((15*x^2+705*x-1125)*exp(3/x)-5*x^2-250*x-3125)/(x^2+50*x+625),x, algorithm="giac")

[Out]

-5*(25/x - 3*e^(3/x) + 1)/(1/x + 25/x^2)

Mupad [B] (verification not implemented)

Time = 8.92 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12 \[ \int \frac {-3125-250 x-5 x^2+e^{3/x} \left (-1125+705 x+15 x^2\right )}{625+50 x+x^2} \, dx=-\frac {125\,x-15\,x^2\,{\mathrm {e}}^{3/x}+5\,x^2}{x+25} \]

[In]

int(-(250*x - exp(3/x)*(705*x + 15*x^2 - 1125) + 5*x^2 + 3125)/(50*x + x^2 + 625),x)

[Out]

-(125*x - 15*x^2*exp(3/x) + 5*x^2)/(x + 25)