3.6.46 \(\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. Leaf size=26 \[ 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]
time = 0.04, antiderivative size = 41, normalized size of antiderivative = 1.58, number of steps used = 7, number of rules used = 4, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.082, Rules used = {14, 2207, 2225, 2228} \begin {gather*} 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) \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 1.15, size = 30, normalized size = 1.15 \begin {gather*} 5 \left (\frac {e^{2 x}}{x}+x+x^2+x^3+e^x (2+2 x)+\log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[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]
time = 0.16, size = 37, normalized size = 1.42

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\)
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\)

Verification of antiderivative is not currently implemented for this CAS.

[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+10*exp(x)*x+10*exp(x)+5*exp(x)^2/x

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.31, size = 42, normalized size = 1.62 \begin {gather*} 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 ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

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

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 32, normalized size = 1.23 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.05, size = 37, normalized size = 1.42 \begin {gather*} 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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 35, normalized size = 1.35 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.47, size = 36, normalized size = 1.38 \begin {gather*} 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 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________