3.16.82 \(\int \frac {x^3+2 x^4-16 x^6+36 x^8-32 x^{10}+10 x^{12}+e^{2 x} (-2+2 x-2 x^3)+e^x (-2 x^3+8 x^4+4 x^5-8 x^6-2 x^7)}{x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.33, antiderivative size = 60, normalized size of antiderivative = 1.88, number of steps used = 27, number of rules used = 7, integrand size = 79, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {14, 2196, 2194, 2176, 2199, 2177, 2178} \begin {gather*} x^{10}-4 x^8+6 x^6-2 e^x x^4-4 x^4+4 e^x x^2+x^2+\frac {e^{2 x}}{x^2}+x-2 e^x-e^{2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^3 + 2*x^4 - 16*x^6 + 36*x^8 - 32*x^10 + 10*x^12 + E^(2*x)*(-2 + 2*x - 2*x^3) + E^x*(-2*x^3 + 8*x^4 + 4*
x^5 - 8*x^6 - 2*x^7))/x^3,x]

[Out]

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

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

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 (1+2 x-16 x^3+36 x^5-32 x^7+10 x^9-2 e^x (-1+x) (1+x) \left (-1+4 x+x^2\right )-\frac {2 e^{2 x} \left (1-x+x^3\right )}{x^3}\right ) \, dx\\ &=x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-2 \int e^x (-1+x) (1+x) \left (-1+4 x+x^2\right ) \, dx-2 \int \frac {e^{2 x} \left (1-x+x^3\right )}{x^3} \, dx\\ &=x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-2 \int \left (e^{2 x}+\frac {e^{2 x}}{x^3}-\frac {e^{2 x}}{x^2}\right ) \, dx-2 \int \left (e^x-4 e^x x-2 e^x x^2+4 e^x x^3+e^x x^4\right ) \, dx\\ &=x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-2 \int e^x \, dx-2 \int e^{2 x} \, dx-2 \int \frac {e^{2 x}}{x^3} \, dx+2 \int \frac {e^{2 x}}{x^2} \, dx-2 \int e^x x^4 \, dx+4 \int e^x x^2 \, dx+8 \int e^x x \, dx-8 \int e^x x^3 \, dx\\ &=-2 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}-\frac {2 e^{2 x}}{x}+x+8 e^x x+x^2+4 e^x x^2-8 e^x x^3-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}-2 \int \frac {e^{2 x}}{x^2} \, dx+4 \int \frac {e^{2 x}}{x} \, dx-8 \int e^x \, dx-8 \int e^x x \, dx+8 \int e^x x^3 \, dx+24 \int e^x x^2 \, dx\\ &=-10 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x+x^2+28 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}+4 \text {Ei}(2 x)-4 \int \frac {e^{2 x}}{x} \, dx+8 \int e^x \, dx-24 \int e^x x^2 \, dx-48 \int e^x x \, dx\\ &=-2 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x-48 e^x x+x^2+4 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}+48 \int e^x \, dx+48 \int e^x x \, dx\\ &=46 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x+x^2+4 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}-48 \int e^x \, dx\\ &=-2 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x+x^2+4 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 55, normalized size = 1.72 \begin {gather*} x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-\frac {e^{2 x} \left (-x+x^3\right )}{x^3}-2 e^x \left (1-2 x^2+x^4\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^3 + 2*x^4 - 16*x^6 + 36*x^8 - 32*x^10 + 10*x^12 + E^(2*x)*(-2 + 2*x - 2*x^3) + E^x*(-2*x^3 + 8*x^
4 + 4*x^5 - 8*x^6 - 2*x^7))/x^3,x]

[Out]

x + x^2 - 4*x^4 + 6*x^6 - 4*x^8 + x^10 - (E^(2*x)*(-x + x^3))/x^3 - 2*E^x*(1 - 2*x^2 + x^4)

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 56, normalized size = 1.75 \begin {gather*} \frac {x^{12} - 4 \, x^{10} + 6 \, x^{8} - 4 \, x^{6} + x^{4} + x^{3} - {\left (x^{2} - 1\right )} e^{\left (2 \, x\right )} - 2 \, {\left (x^{6} - 2 \, x^{4} + x^{2}\right )} e^{x}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+2*x-2)*exp(x)^2+(-2*x^7-8*x^6+4*x^5+8*x^4-2*x^3)*exp(x)+10*x^12-32*x^10+36*x^8-16*x^6+2*x^4
+x^3)/x^3,x, algorithm="fricas")

[Out]

(x^12 - 4*x^10 + 6*x^8 - 4*x^6 + x^4 + x^3 - (x^2 - 1)*e^(2*x) - 2*(x^6 - 2*x^4 + x^2)*e^x)/x^2

________________________________________________________________________________________

giac [B]  time = 0.27, size = 63, normalized size = 1.97 \begin {gather*} \frac {x^{12} - 4 \, x^{10} + 6 \, x^{8} - 2 \, x^{6} e^{x} - 4 \, x^{6} + 4 \, x^{4} e^{x} + x^{4} + x^{3} - x^{2} e^{\left (2 \, x\right )} - 2 \, x^{2} e^{x} + e^{\left (2 \, x\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+2*x-2)*exp(x)^2+(-2*x^7-8*x^6+4*x^5+8*x^4-2*x^3)*exp(x)+10*x^12-32*x^10+36*x^8-16*x^6+2*x^4
+x^3)/x^3,x, algorithm="giac")

[Out]

(x^12 - 4*x^10 + 6*x^8 - 2*x^6*e^x - 4*x^6 + 4*x^4*e^x + x^4 + x^3 - x^2*e^(2*x) - 2*x^2*e^x + e^(2*x))/x^2

________________________________________________________________________________________

maple [A]  time = 0.07, size = 53, normalized size = 1.66




method result size



risch \(x^{10}-4 x^{8}+6 x^{6}-4 x^{4}+x^{2}+x -\frac {\left (x^{2}-1\right ) {\mathrm e}^{2 x}}{x^{2}}+\left (-2 x^{4}+4 x^{2}-2\right ) {\mathrm e}^{x}\) \(53\)
default \(x^{10}-4 x^{8}+6 x^{6}-4 x^{4}+x^{2}+x -{\mathrm e}^{2 x}+\frac {{\mathrm e}^{2 x}}{x^{2}}+4 \,{\mathrm e}^{x} x^{2}-2 \,{\mathrm e}^{x} x^{4}-2 \,{\mathrm e}^{x}\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x^3+2*x-2)*exp(x)^2+(-2*x^7-8*x^6+4*x^5+8*x^4-2*x^3)*exp(x)+10*x^12-32*x^10+36*x^8-16*x^6+2*x^4+x^3)/
x^3,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.61, size = 105, normalized size = 3.28 \begin {gather*} x^{10} - 4 \, x^{8} + 6 \, x^{6} - 4 \, x^{4} + x^{2} - 2 \, {\left (x^{4} - 4 \, x^{3} + 12 \, x^{2} - 24 \, x + 24\right )} e^{x} - 8 \, {\left (x^{3} - 3 \, x^{2} + 6 \, x - 6\right )} e^{x} + 4 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 8 \, {\left (x - 1\right )} e^{x} + x - e^{\left (2 \, x\right )} - 2 \, e^{x} + 4 \, \Gamma \left (-1, -2 \, x\right ) + 8 \, \Gamma \left (-2, -2 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+2*x-2)*exp(x)^2+(-2*x^7-8*x^6+4*x^5+8*x^4-2*x^3)*exp(x)+10*x^12-32*x^10+36*x^8-16*x^6+2*x^4
+x^3)/x^3,x, algorithm="maxima")

[Out]

x^10 - 4*x^8 + 6*x^6 - 4*x^4 + x^2 - 2*(x^4 - 4*x^3 + 12*x^2 - 24*x + 24)*e^x - 8*(x^3 - 3*x^2 + 6*x - 6)*e^x
+ 4*(x^2 - 2*x + 2)*e^x + 8*(x - 1)*e^x + x - e^(2*x) - 2*e^x + 4*gamma(-1, -2*x) + 8*gamma(-2, -2*x)

________________________________________________________________________________________

mupad [B]  time = 1.08, size = 54, normalized size = 1.69 \begin {gather*} x-{\mathrm {e}}^{2\,x}-2\,{\mathrm {e}}^x+\frac {{\mathrm {e}}^{2\,x}}{x^2}+x^2\,\left (4\,{\mathrm {e}}^x+1\right )-x^4\,\left (2\,{\mathrm {e}}^x+4\right )+6\,x^6-4\,x^8+x^{10} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(2*x)*(2*x^3 - 2*x + 2) + exp(x)*(2*x^3 - 8*x^4 - 4*x^5 + 8*x^6 + 2*x^7) - x^3 - 2*x^4 + 16*x^6 - 36*
x^8 + 32*x^10 - 10*x^12)/x^3,x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.14, size = 54, normalized size = 1.69 \begin {gather*} x^{10} - 4 x^{8} + 6 x^{6} - 4 x^{4} + x^{2} + x + \frac {\left (1 - x^{2}\right ) e^{2 x} + \left (- 2 x^{6} + 4 x^{4} - 2 x^{2}\right ) e^{x}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x**3+2*x-2)*exp(x)**2+(-2*x**7-8*x**6+4*x**5+8*x**4-2*x**3)*exp(x)+10*x**12-32*x**10+36*x**8-16
*x**6+2*x**4+x**3)/x**3,x)

[Out]

x**10 - 4*x**8 + 6*x**6 - 4*x**4 + x**2 + x + ((1 - x**2)*exp(2*x) + (-2*x**6 + 4*x**4 - 2*x**2)*exp(x))/x**2

________________________________________________________________________________________