\(\int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x (20 x^2+10 x^3)}{x^2} \, dx\) [546]

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.58, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.082, Rules used = {14, 2207, 2225, 2228} \[ \int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x \left (20 x^2+10 x^3\right )}{x^2} \, dx=5 x^3+5 x^2+5 x-10 e^x+10 e^x (x+2)+\frac {5 e^{2 x}}{x}+5 \log (x) \]

[In]

Int[(5*x + 5*x^2 + 10*x^3 + 15*x^4 + E^(2*x)*(-5 + 10*x) + E^x*(20*x^2 + 10*x^3))/x^2,x]

[Out]

-10*E^x + (5*E^(2*x))/x + 5*x + 5*x^2 + 5*x^3 + 10*E^x*(2 + x) + 5*Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

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

Mathematica [A] (verified)

Time = 1.27 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.15 \[ \int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x \left (20 x^2+10 x^3\right )}{x^2} \, dx=5 \left (\frac {e^{2 x}}{x}+x+x^2+x^3+e^x (2+2 x)+\log (x)\right ) \]

[In]

Integrate[(5*x + 5*x^2 + 10*x^3 + 15*x^4 + E^(2*x)*(-5 + 10*x) + E^x*(20*x^2 + 10*x^3))/x^2,x]

[Out]

5*(E^(2*x)/x + x + x^2 + x^3 + E^x*(2 + 2*x) + Log[x])

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.38

method result size
risch \(5 x^{2}+5 x +5 \ln \left (x \right )+5 x^{3}+\frac {5 \,{\mathrm e}^{2 x}}{x}+\left (10 x +10\right ) {\mathrm e}^{x}\) \(36\)
default \(5 x^{2}+5 x +5 \ln \left (x \right )+5 x^{3}+10 \,{\mathrm e}^{x} x +10 \,{\mathrm e}^{x}+\frac {5 \,{\mathrm e}^{2 x}}{x}\) \(37\)
parts \(5 x^{2}+5 x +5 \ln \left (x \right )+5 x^{3}+10 \,{\mathrm e}^{x} x +10 \,{\mathrm e}^{x}+\frac {5 \,{\mathrm e}^{2 x}}{x}\) \(37\)
norman \(\frac {5 x^{2}+5 x^{3}+5 x^{4}+5 \,{\mathrm e}^{2 x}+10 \,{\mathrm e}^{x} x +10 \,{\mathrm e}^{x} x^{2}}{x}+5 \ln \left (x \right )\) \(44\)
parallelrisch \(\frac {5 x^{4}+5 x^{3}+10 \,{\mathrm e}^{x} x^{2}+5 x \ln \left (x \right )+5 x^{2}+10 \,{\mathrm e}^{x} x +5 \,{\mathrm e}^{2 x}}{x}\) \(44\)

[In]

int(((10*x-5)*exp(x)^2+(10*x^3+20*x^2)*exp(x)+15*x^4+10*x^3+5*x^2+5*x)/x^2,x,method=_RETURNVERBOSE)

[Out]

5*x^2+5*x+5*ln(x)+5*x^3+5*exp(x)^2/x+(10*x+10)*exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23 \[ \int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x \left (20 x^2+10 x^3\right )}{x^2} \, dx=\frac {5 \, {\left (x^{4} + x^{3} + x^{2} + 2 \, {\left (x^{2} + x\right )} e^{x} + x \log \left (x\right ) + e^{\left (2 \, x\right )}\right )}}{x} \]

[In]

integrate(((10*x-5)*exp(x)^2+(10*x^3+20*x^2)*exp(x)+15*x^4+10*x^3+5*x^2+5*x)/x^2,x, algorithm="fricas")

[Out]

5*(x^4 + x^3 + x^2 + 2*(x^2 + x)*e^x + x*log(x) + e^(2*x))/x

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.42 \[ \int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x \left (20 x^2+10 x^3\right )}{x^2} \, dx=5 x^{3} + 5 x^{2} + 5 x + 5 \log {\left (x \right )} + \frac {\left (10 x^{2} + 10 x\right ) e^{x} + 5 e^{2 x}}{x} \]

[In]

integrate(((10*x-5)*exp(x)**2+(10*x**3+20*x**2)*exp(x)+15*x**4+10*x**3+5*x**2+5*x)/x**2,x)

[Out]

5*x**3 + 5*x**2 + 5*x + 5*log(x) + ((10*x**2 + 10*x)*exp(x) + 5*exp(2*x))/x

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.21 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.62 \[ \int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x \left (20 x^2+10 x^3\right )}{x^2} \, dx=5 \, x^{3} + 5 \, x^{2} + 10 \, {\left (x - 1\right )} e^{x} + 5 \, x + 10 \, {\rm Ei}\left (2 \, x\right ) + 20 \, e^{x} - 10 \, \Gamma \left (-1, -2 \, x\right ) + 5 \, \log \left (x\right ) \]

[In]

integrate(((10*x-5)*exp(x)^2+(10*x^3+20*x^2)*exp(x)+15*x^4+10*x^3+5*x^2+5*x)/x^2,x, algorithm="maxima")

[Out]

5*x^3 + 5*x^2 + 10*(x - 1)*e^x + 5*x + 10*Ei(2*x) + 20*e^x - 10*gamma(-1, -2*x) + 5*log(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.35 \[ \int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x \left (20 x^2+10 x^3\right )}{x^2} \, dx=\frac {5 \, {\left (x^{4} + x^{3} + 2 \, x^{2} e^{x} + x^{2} + 2 \, x e^{x} + x \log \left (x\right ) + e^{\left (2 \, x\right )}\right )}}{x} \]

[In]

integrate(((10*x-5)*exp(x)^2+(10*x^3+20*x^2)*exp(x)+15*x^4+10*x^3+5*x^2+5*x)/x^2,x, algorithm="giac")

[Out]

5*(x^4 + x^3 + 2*x^2*e^x + x^2 + 2*x*e^x + x*log(x) + e^(2*x))/x

Mupad [B] (verification not implemented)

Time = 7.88 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.38 \[ \int \frac {5 x+5 x^2+10 x^3+15 x^4+e^{2 x} (-5+10 x)+e^x \left (20 x^2+10 x^3\right )}{x^2} \, dx=10\,{\mathrm {e}}^x+5\,\ln \left (x\right )+x\,\left (10\,{\mathrm {e}}^x+5\right )+\frac {5\,{\mathrm {e}}^{2\,x}}{x}+5\,x^2+5\,x^3 \]

[In]

int((5*x + exp(x)*(20*x^2 + 10*x^3) + exp(2*x)*(10*x - 5) + 5*x^2 + 10*x^3 + 15*x^4)/x^2,x)

[Out]

10*exp(x) + 5*log(x) + x*(10*exp(x) + 5) + (5*exp(2*x))/x + 5*x^2 + 5*x^3