3.2.58 \(\int \frac {-12+2 x^3+e^x (-8 x+8 x^2+2 x^3+e^4 (-2 x+2 x^2))}{x^3} \, dx\)

Optimal. Leaf size=20 \[ \frac {2 \left (3+x \left (4+e^4+x\right ) \left (e^x+x\right )\right )}{x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 27, normalized size of antiderivative = 1.35, number of steps used = 10, number of rules used = 5, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {14, 2199, 2194, 2177, 2178} \begin {gather*} \frac {6}{x^2}+2 x+2 e^x+\frac {2 \left (4+e^4\right ) e^x}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*E^x + 6/x^2 + (2*E^x*(4 + E^4))/x + 2*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 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$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 2199

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 27, normalized size = 1.35 \begin {gather*} 2 \left (\frac {3}{x^2}+x+\frac {e^x \left (\left (4+e^4\right ) x+x^2\right )}{x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*(3/x^2 + x + (E^x*((4 + E^4)*x + x^2))/x^2)

________________________________________________________________________________________

fricas [A]  time = 0.94, size = 24, normalized size = 1.20 \begin {gather*} \frac {2 \, {\left (x^{3} + {\left (x^{2} + x e^{4} + 4 \, x\right )} e^{x} + 3\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.24, size = 27, normalized size = 1.35 \begin {gather*} \frac {2 \, {\left (x^{3} + x^{2} e^{x} + x e^{\left (x + 4\right )} + 4 \, x e^{x} + 3\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 22, normalized size = 1.10




method result size



risch \(2 x +\frac {6}{x^{2}}+\frac {2 \left (x +4+{\mathrm e}^{4}\right ) {\mathrm e}^{x}}{x}\) \(22\)
norman \(\frac {6+\left (2 \,{\mathrm e}^{4}+8\right ) x \,{\mathrm e}^{x}+2 x^{3}+2 \,{\mathrm e}^{x} x^{2}}{x^{2}}\) \(29\)
default \(2 x +\frac {6}{x^{2}}+\frac {8 \,{\mathrm e}^{x}}{x}-2 \,{\mathrm e}^{4} \left (-\frac {{\mathrm e}^{x}}{x}-\expIntegralEi \left (1, -x \right )\right )-2 \,{\mathrm e}^{4} \expIntegralEi \left (1, -x \right )+2 \,{\mathrm e}^{x}\) \(49\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x+6/x^2+2*(x+4+exp(4))/x*exp(x)

________________________________________________________________________________________

maxima [C]  time = 0.47, size = 39, normalized size = 1.95 \begin {gather*} 2 \, {\rm Ei}\relax (x) e^{4} - 2 \, e^{4} \Gamma \left (-1, -x\right ) + 2 \, x + \frac {6}{x^{2}} + 8 \, {\rm Ei}\relax (x) + 2 \, e^{x} - 8 \, \Gamma \left (-1, -x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*Ei(x)*e^4 - 2*e^4*gamma(-1, -x) + 2*x + 6/x^2 + 8*Ei(x) + 2*e^x - 8*gamma(-1, -x)

________________________________________________________________________________________

mupad [B]  time = 0.28, size = 24, normalized size = 1.20 \begin {gather*} 2\,x+2\,{\mathrm {e}}^x+\frac {x\,{\mathrm {e}}^x\,\left (2\,{\mathrm {e}}^4+8\right )+6}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x + 2*exp(x) + (x*exp(x)*(2*exp(4) + 8) + 6)/x^2

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 22, normalized size = 1.10 \begin {gather*} 2 x + \frac {\left (2 x + 8 + 2 e^{4}\right ) e^{x}}{x} + \frac {6}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x + (2*x + 8 + 2*exp(4))*exp(x)/x + 6/x**2

________________________________________________________________________________________