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

Optimal. Leaf size=19 \[ \frac {5}{x}+x-\left (5+e^x+x^2\right )^2 \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 37, normalized size of antiderivative = 1.95, number of steps used = 13, number of rules used = 4, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.082, Rules used = {14, 2194, 2196, 2176} \begin {gather*} -x^4-2 e^x x^2-10 x^2+x-10 e^x-e^{2 x}+\frac {5}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-10*E^x - E^(2*x) + 5/x + x - 10*x^2 - 2*E^x*x^2 - x^4

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 2176

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] &&  !$UseGamma === True

Rule 2194

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 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-2 e^{2 x}-2 e^x \left (5+2 x+x^2\right )+\frac {-5+x^2-20 x^3-4 x^5}{x^2}\right ) \, dx\\ &=-\left (2 \int e^{2 x} \, dx\right )-2 \int e^x \left (5+2 x+x^2\right ) \, dx+\int \frac {-5+x^2-20 x^3-4 x^5}{x^2} \, dx\\ &=-e^{2 x}-2 \int \left (5 e^x+2 e^x x+e^x x^2\right ) \, dx+\int \left (1-\frac {5}{x^2}-20 x-4 x^3\right ) \, dx\\ &=-e^{2 x}+\frac {5}{x}+x-10 x^2-x^4-2 \int e^x x^2 \, dx-4 \int e^x x \, dx-10 \int e^x \, dx\\ &=-10 e^x-e^{2 x}+\frac {5}{x}+x-4 e^x x-10 x^2-2 e^x x^2-x^4+4 \int e^x \, dx+4 \int e^x x \, dx\\ &=-6 e^x-e^{2 x}+\frac {5}{x}+x-10 x^2-2 e^x x^2-x^4-4 \int e^x \, dx\\ &=-10 e^x-e^{2 x}+\frac {5}{x}+x-10 x^2-2 e^x x^2-x^4\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 34, normalized size = 1.79 \begin {gather*} -e^{2 x}+\frac {5}{x}+x-10 x^2-x^4-2 e^x \left (5+x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-E^(2*x) + 5/x + x - 10*x^2 - x^4 - 2*E^x*(5 + x^2)

________________________________________________________________________________________

fricas [B]  time = 0.66, size = 37, normalized size = 1.95 \begin {gather*} -\frac {x^{5} + 10 \, x^{3} - x^{2} + x e^{\left (2 \, x\right )} + 2 \, {\left (x^{3} + 5 \, x\right )} e^{x} - 5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.16, size = 38, normalized size = 2.00 \begin {gather*} -\frac {x^{5} + 2 \, x^{3} e^{x} + 10 \, x^{3} - x^{2} + x e^{\left (2 \, x\right )} + 10 \, x e^{x} - 5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 34, normalized size = 1.79




method result size



risch \(-10 x^{2}+x +\frac {5}{x}-x^{4}-{\mathrm e}^{2 x}+\left (-2 x^{2}-10\right ) {\mathrm e}^{x}\) \(34\)
default \(-10 x^{2}+x +\frac {5}{x}-x^{4}-{\mathrm e}^{2 x}-2 \,{\mathrm e}^{x} x^{2}-10 \,{\mathrm e}^{x}\) \(35\)
norman \(\frac {5+x^{2}-10 x^{3}-x^{5}-x \,{\mathrm e}^{2 x}-10 \,{\mathrm e}^{x} x -2 \,{\mathrm e}^{x} x^{3}}{x}\) \(39\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-10*x^2+x+5/x-x^4-exp(2*x)+(-2*x^2-10)*exp(x)

________________________________________________________________________________________

maxima [B]  time = 0.49, size = 46, normalized size = 2.42 \begin {gather*} -x^{4} - 10 \, x^{2} - 2 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} - 4 \, {\left (x - 1\right )} e^{x} + x + \frac {5}{x} - e^{\left (2 \, x\right )} - 10 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x^4 - 10*x^2 - 2*(x^2 - 2*x + 2)*e^x - 4*(x - 1)*e^x + x + 5/x - e^(2*x) - 10*e^x

________________________________________________________________________________________

mupad [B]  time = 2.01, size = 33, normalized size = 1.74 \begin {gather*} x-{\mathrm {e}}^{2\,x}-10\,{\mathrm {e}}^x-x^2\,\left (2\,{\mathrm {e}}^x+10\right )+\frac {5}{x}-x^4 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - exp(2*x) - 10*exp(x) - x^2*(2*exp(x) + 10) + 5/x - x^4

________________________________________________________________________________________

sympy [B]  time = 0.14, size = 29, normalized size = 1.53 \begin {gather*} - x^{4} - 10 x^{2} + x + \left (- 2 x^{2} - 10\right ) e^{x} - e^{2 x} + \frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**4 - 10*x**2 + x + (-2*x**2 - 10)*exp(x) - exp(2*x) + 5/x

________________________________________________________________________________________