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

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

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 46, normalized size of antiderivative = 1.44, number of steps used = 4, number of rules used = 3, integrand size = 74, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.041, Rules used = {14, 6706, 2288} \begin {gather*} 3 \left (4+e^2\right ) e^{\frac {1}{x}-x}-\frac {e^{-3 x+\frac {1}{x}+2} \left (3 x^2+1\right )}{\left (\frac {1}{x^2}+3\right ) x^4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

3*E^(x^(-1) - x)*(4 + E^2) - (E^(2 + x^(-1) - 3*x)*(1 + 3*x^2))/((3 + 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 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 6706

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[(q*F^v)/Log[F], x] /;  !FalseQ[q]
] /; FreeQ[F, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.28, size = 32, normalized size = 1.00 \begin {gather*} 3 e^{\frac {1}{x}-x} \left (4+e^2\right )-\frac {e^{2+\frac {1}{x}-3 x}}{x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 48, normalized size = 1.50 \begin {gather*} \frac {3 \, {\left (x^{2} e^{2} + 4 \, x^{2}\right )} e^{\left (-\frac {x^{2} - 1}{x}\right )} - e^{\left (-\frac {3 \, x^{2} - 2 \, x - 1}{x}\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.15, size = 58, normalized size = 1.81 \begin {gather*} \frac {3 \, x^{2} e^{\left (-\frac {x^{2} - 2 \, x - 1}{x}\right )} + 12 \, x^{2} e^{\left (-\frac {x^{2} - 1}{x}\right )} - e^{\left (-\frac {3 \, x^{2} - 2 \, x - 1}{x}\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.18, size = 38, normalized size = 1.19




method result size



risch \(\frac {\left (3 x^{2} {\mathrm e}^{2}+12 x^{2}-{\mathrm e}^{-2 x +2}\right ) {\mathrm e}^{-\frac {\left (x -1\right ) \left (x +1\right )}{x}}}{x^{2}}\) \(38\)
norman \(\frac {\left (3 \,{\mathrm e}^{2}+12\right ) x^{3} {\mathrm e}^{\frac {-x^{2}+1}{x}}-x \,{\mathrm e}^{-2 x +2} {\mathrm e}^{\frac {-x^{2}+1}{x}}}{x^{3}}\) \(51\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((3*x^2+2*x+1)*exp((-x^2+1)/x)*exp(1-x)^2+((-3*x^4-3*x^2)*exp(2)-12*x^4-12*x^2)*exp((-x^2+1)/x))/x^4,x,met
hod=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 30, normalized size = 0.94 \begin {gather*} \frac {{\left (3 \, x^{2} {\left (e^{2} + 4\right )} e^{\left (2 \, x\right )} - e^{2}\right )} e^{\left (-3 \, x + \frac {1}{x}\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.92, size = 37, normalized size = 1.16 \begin {gather*} \frac {{\mathrm {e}}^{\frac {1}{x}-3\,x}\,\left (12\,x^2\,{\mathrm {e}}^{2\,x}-{\mathrm {e}}^2+3\,x^2\,{\mathrm {e}}^{2\,x+2}\right )}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.43, size = 32, normalized size = 1.00 \begin {gather*} \left (12 + 3 e^{2}\right ) e^{\frac {1 - x^{2}}{x}} - \frac {e^{\frac {1 - x^{2}}{x}} e^{2 - 2 x}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(12 + 3*exp(2))*exp((1 - x**2)/x) - exp((1 - x**2)/x)*exp(2 - 2*x)/x**2

________________________________________________________________________________________