3.40.34 \(\int \frac {-2-48 x-102 x^3+2 e^{2 x} x^3-280 x^4+36 x^5+36 x^6+e^x (2 x-2 x^2-44 x^3+16 x^4+6 x^5)}{x^3} \, dx\) [3934]

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

[Out]

(exp(x)-1/x+3*x^2+2*x-24)^2

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(59\) vs. \(2(24)=48\).
time = 0.15, antiderivative size = 59, normalized size of antiderivative = 2.46, number of steps used = 16, number of rules used = 6, integrand size = 67, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.090, Rules used = {14, 2225, 2230, 2208, 2209, 2207} \begin {gather*} 9 x^4+12 x^3+6 e^x x^2-140 x^2+\frac {1}{x^2}+4 e^x x-102 x-48 e^x+e^{2 x}-\frac {2 e^x}{x}+\frac {48}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2 - 48*x - 102*x^3 + 2*E^(2*x)*x^3 - 280*x^4 + 36*x^5 + 36*x^6 + E^x*(2*x - 2*x^2 - 44*x^3 + 16*x^4 + 6*
x^5))/x^3,x]

[Out]

-48*E^x + E^(2*x) + x^(-2) + 48/x - (2*E^x)/x - 102*x + 4*E^x*x - 140*x^2 + 6*E^x*x^2 + 12*x^3 + 9*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 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 2208

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] &&  !TrueQ[$UseGamm
a]

Rule 2209

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

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] &&  !TrueQ[$UseGamma]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (2 e^{2 x}+\frac {2 e^x \left (1-x-22 x^2+8 x^3+3 x^4\right )}{x^2}+\frac {2 \left (-1-24 x-51 x^3-140 x^4+18 x^5+18 x^6\right )}{x^3}\right ) \, dx\\ &=2 \int e^{2 x} \, dx+2 \int \frac {e^x \left (1-x-22 x^2+8 x^3+3 x^4\right )}{x^2} \, dx+2 \int \frac {-1-24 x-51 x^3-140 x^4+18 x^5+18 x^6}{x^3} \, dx\\ &=e^{2 x}+2 \int \left (-22 e^x+\frac {e^x}{x^2}-\frac {e^x}{x}+8 e^x x+3 e^x x^2\right ) \, dx+2 \int \left (-51-\frac {1}{x^3}-\frac {24}{x^2}-140 x+18 x^2+18 x^3\right ) \, dx\\ &=e^{2 x}+\frac {1}{x^2}+\frac {48}{x}-102 x-140 x^2+12 x^3+9 x^4+2 \int \frac {e^x}{x^2} \, dx-2 \int \frac {e^x}{x} \, dx+6 \int e^x x^2 \, dx+16 \int e^x x \, dx-44 \int e^x \, dx\\ &=-44 e^x+e^{2 x}+\frac {1}{x^2}+\frac {48}{x}-\frac {2 e^x}{x}-102 x+16 e^x x-140 x^2+6 e^x x^2+12 x^3+9 x^4-2 \text {Ei}(x)+2 \int \frac {e^x}{x} \, dx-12 \int e^x x \, dx-16 \int e^x \, dx\\ &=-60 e^x+e^{2 x}+\frac {1}{x^2}+\frac {48}{x}-\frac {2 e^x}{x}-102 x+4 e^x x-140 x^2+6 e^x x^2+12 x^3+9 x^4+12 \int e^x \, dx\\ &=-48 e^x+e^{2 x}+\frac {1}{x^2}+\frac {48}{x}-\frac {2 e^x}{x}-102 x+4 e^x x-140 x^2+6 e^x x^2+12 x^3+9 x^4\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(24)=48\).
time = 3.73, size = 51, normalized size = 2.12 \begin {gather*} e^{2 x}+\frac {1}{x^2}+\frac {48}{x}-102 x-140 x^2+12 x^3+9 x^4+e^x \left (-48-\frac {2}{x}+4 x+6 x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2 - 48*x - 102*x^3 + 2*E^(2*x)*x^3 - 280*x^4 + 36*x^5 + 36*x^6 + E^x*(2*x - 2*x^2 - 44*x^3 + 16*x^
4 + 6*x^5))/x^3,x]

[Out]

E^(2*x) + x^(-2) + 48/x - 102*x - 140*x^2 + 12*x^3 + 9*x^4 + E^x*(-48 - 2/x + 4*x + 6*x^2)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(54\) vs. \(2(19)=38\).
time = 0.15, size = 55, normalized size = 2.29

method result size
default \(-140 x^{2}-102 x +\frac {1}{x^{2}}+\frac {48}{x}+12 x^{3}+9 x^{4}+{\mathrm e}^{2 x}-\frac {2 \,{\mathrm e}^{x}}{x}+4 \,{\mathrm e}^{x} x -48 \,{\mathrm e}^{x}+6 \,{\mathrm e}^{x} x^{2}\) \(55\)
risch \(9 x^{4}+12 x^{3}-140 x^{2}-102 x +\frac {48 x +1}{x^{2}}+{\mathrm e}^{2 x}+\frac {2 \left (3 x^{3}+2 x^{2}-24 x -1\right ) {\mathrm e}^{x}}{x}\) \(55\)
norman \(\frac {1+{\mathrm e}^{2 x} x^{2}+48 x -102 x^{3}-140 x^{4}+12 x^{5}+9 x^{6}-2 \,{\mathrm e}^{x} x -48 \,{\mathrm e}^{x} x^{2}+4 \,{\mathrm e}^{x} x^{3}+6 \,{\mathrm e}^{x} x^{4}}{x^{2}}\) \(64\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*exp(x)^2*x^3+(6*x^5+16*x^4-44*x^3-2*x^2+2*x)*exp(x)+36*x^6+36*x^5-280*x^4-102*x^3-48*x-2)/x^3,x,method=
_RETURNVERBOSE)

[Out]

-140*x^2-102*x+1/x^2+48/x+12*x^3+9*x^4+exp(x)^2-2*exp(x)/x+4*exp(x)*x-48*exp(x)+6*exp(x)*x^2

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.30, size = 65, normalized size = 2.71 \begin {gather*} 9 \, x^{4} + 12 \, x^{3} - 140 \, x^{2} + 6 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 16 \, {\left (x - 1\right )} e^{x} - 102 \, x + \frac {48}{x} + \frac {1}{x^{2}} - 2 \, {\rm Ei}\left (x\right ) + e^{\left (2 \, x\right )} - 44 \, e^{x} + 2 \, \Gamma \left (-1, -x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*exp(x)^2*x^3+(6*x^5+16*x^4-44*x^3-2*x^2+2*x)*exp(x)+36*x^6+36*x^5-280*x^4-102*x^3-48*x-2)/x^3,x,
algorithm="maxima")

[Out]

9*x^4 + 12*x^3 - 140*x^2 + 6*(x^2 - 2*x + 2)*e^x + 16*(x - 1)*e^x - 102*x + 48/x + 1/x^2 - 2*Ei(x) + e^(2*x) -
 44*e^x + 2*gamma(-1, -x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (19) = 38\).
time = 0.41, size = 60, normalized size = 2.50 \begin {gather*} \frac {9 \, x^{6} + 12 \, x^{5} - 140 \, x^{4} - 102 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + 2 \, {\left (3 \, x^{4} + 2 \, x^{3} - 24 \, x^{2} - x\right )} e^{x} + 48 \, x + 1}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*exp(x)^2*x^3+(6*x^5+16*x^4-44*x^3-2*x^2+2*x)*exp(x)+36*x^6+36*x^5-280*x^4-102*x^3-48*x-2)/x^3,x,
algorithm="fricas")

[Out]

(9*x^6 + 12*x^5 - 140*x^4 - 102*x^3 + x^2*e^(2*x) + 2*(3*x^4 + 2*x^3 - 24*x^2 - x)*e^x + 48*x + 1)/x^2

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (17) = 34\).
time = 0.06, size = 53, normalized size = 2.21 \begin {gather*} 9 x^{4} + 12 x^{3} - 140 x^{2} - 102 x + \frac {x e^{2 x} + \left (6 x^{3} + 4 x^{2} - 48 x - 2\right ) e^{x}}{x} + \frac {48 x + 1}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*exp(x)**2*x**3+(6*x**5+16*x**4-44*x**3-2*x**2+2*x)*exp(x)+36*x**6+36*x**5-280*x**4-102*x**3-48*x-
2)/x**3,x)

[Out]

9*x**4 + 12*x**3 - 140*x**2 - 102*x + (x*exp(2*x) + (6*x**3 + 4*x**2 - 48*x - 2)*exp(x))/x + (48*x + 1)/x**2

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (19) = 38\).
time = 0.39, size = 63, normalized size = 2.62 \begin {gather*} \frac {9 \, x^{6} + 12 \, x^{5} + 6 \, x^{4} e^{x} - 140 \, x^{4} + 4 \, x^{3} e^{x} - 102 \, x^{3} + x^{2} e^{\left (2 \, x\right )} - 48 \, x^{2} e^{x} - 2 \, x e^{x} + 48 \, x + 1}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*exp(x)^2*x^3+(6*x^5+16*x^4-44*x^3-2*x^2+2*x)*exp(x)+36*x^6+36*x^5-280*x^4-102*x^3-48*x-2)/x^3,x,
algorithm="giac")

[Out]

(9*x^6 + 12*x^5 + 6*x^4*e^x - 140*x^4 + 4*x^3*e^x - 102*x^3 + x^2*e^(2*x) - 48*x^2*e^x - 2*x*e^x + 48*x + 1)/x
^2

________________________________________________________________________________________

Mupad [B]
time = 0.08, size = 52, normalized size = 2.17 \begin {gather*} {\mathrm {e}}^{2\,x}-48\,{\mathrm {e}}^x-\frac {x\,\left (2\,{\mathrm {e}}^x-48\right )-1}{x^2}+x\,\left (4\,{\mathrm {e}}^x-102\right )+x^2\,\left (6\,{\mathrm {e}}^x-140\right )+12\,x^3+9\,x^4 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(48*x - exp(x)*(2*x - 2*x^2 - 44*x^3 + 16*x^4 + 6*x^5) - 2*x^3*exp(2*x) + 102*x^3 + 280*x^4 - 36*x^5 - 36
*x^6 + 2)/x^3,x)

[Out]

exp(2*x) - 48*exp(x) - (x*(2*exp(x) - 48) - 1)/x^2 + x*(4*exp(x) - 102) + x^2*(6*exp(x) - 140) + 12*x^3 + 9*x^
4

________________________________________________________________________________________