3.5.25 \(\int \frac {-8+5 x^2-6 x^3+e^x (-12 x^2+3 x^3)}{x^2} \, dx\)

Optimal. Leaf size=22 \[ 3 e^x (-5+x)+\frac {8}{x}-x (-5+3 x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 29, normalized size of antiderivative = 1.32, number of steps used = 6, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {14, 2176, 2194} \begin {gather*} -3 x^2+5 x-3 e^x-3 e^x (4-x)+\frac {8}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-8 + 5*x^2 - 6*x^3 + E^x*(-12*x^2 + 3*x^3))/x^2,x]

[Out]

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

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 22, normalized size = 1.00 \begin {gather*} 3 e^x (-5+x)+\frac {8}{x}+5 x-3 x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-8 + 5*x^2 - 6*x^3 + E^x*(-12*x^2 + 3*x^3))/x^2,x]

[Out]

3*E^x*(-5 + x) + 8/x + 5*x - 3*x^2

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 28, normalized size = 1.27 \begin {gather*} -\frac {3 \, x^{3} - 5 \, x^{2} - 3 \, {\left (x^{2} - 5 \, x\right )} e^{x} - 8}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^3-12*x^2)*exp(x)-6*x^3+5*x^2-8)/x^2,x, algorithm="fricas")

[Out]

-(3*x^3 - 5*x^2 - 3*(x^2 - 5*x)*e^x - 8)/x

________________________________________________________________________________________

giac [A]  time = 0.31, size = 29, normalized size = 1.32 \begin {gather*} -\frac {3 \, x^{3} - 3 \, x^{2} e^{x} - 5 \, x^{2} + 15 \, x e^{x} - 8}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^3-12*x^2)*exp(x)-6*x^3+5*x^2-8)/x^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 23, normalized size = 1.05




method result size



risch \(-3 x^{2}+5 x +\frac {8}{x}+\left (3 x -15\right ) {\mathrm e}^{x}\) \(23\)
default \(-3 x^{2}+5 x +\frac {8}{x}+3 \,{\mathrm e}^{x} x -15 \,{\mathrm e}^{x}\) \(24\)
norman \(\frac {8+5 x^{2}-3 x^{3}-15 \,{\mathrm e}^{x} x +3 \,{\mathrm e}^{x} x^{2}}{x}\) \(29\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((3*x^3-12*x^2)*exp(x)-6*x^3+5*x^2-8)/x^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 25, normalized size = 1.14 \begin {gather*} -3 \, x^{2} + 3 \, {\left (x - 1\right )} e^{x} + 5 \, x + \frac {8}{x} - 12 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^3-12*x^2)*exp(x)-6*x^3+5*x^2-8)/x^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.46, size = 23, normalized size = 1.05 \begin {gather*} x\,\left (3\,{\mathrm {e}}^x+5\right )-15\,{\mathrm {e}}^x+\frac {8}{x}-3\,x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(x)*(12*x^2 - 3*x^3) - 5*x^2 + 6*x^3 + 8)/x^2,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 19, normalized size = 0.86 \begin {gather*} - 3 x^{2} + 5 x + \left (3 x - 15\right ) e^{x} + \frac {8}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x**3-12*x**2)*exp(x)-6*x**3+5*x**2-8)/x**2,x)

[Out]

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

________________________________________________________________________________________