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

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

________________________________________________________________________________________

Rubi [A]  time = 0.42, antiderivative size = 47, normalized size of antiderivative = 1.74, number of steps used = 11, number of rules used = 7, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {6, 6742, 2199, 2194, 2177, 2178, 2176} \begin {gather*} e^{-2 x} x+4 x+\frac {e^{-2 x}}{2}-\frac {1}{2} \left (1-4 e^2\right ) e^{-2 x}+\frac {e^{4-2 x}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

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

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 31, normalized size = 1.15 \begin {gather*} 2 e^{2-2 x}+\frac {e^{4-2 x}}{x}+4 x+e^{-2 x} x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.87, size = 37, normalized size = 1.37 \begin {gather*} {\left (x^{3} + 2 \, x^{2} e^{2} + x e^{4} + 4 \, x e^{\left (2 \, x + 2 \, \log \relax (x)\right )}\right )} e^{\left (-2 \, x - 2 \, \log \relax (x)\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^3 + 2*x^2*e^2 + x*e^4 + 4*x*e^(2*x + 2*log(x)))*e^(-2*x - 2*log(x))

________________________________________________________________________________________

giac [A]  time = 0.14, size = 33, normalized size = 1.22 \begin {gather*} \frac {x^{2} e^{\left (-2 \, x\right )} + 4 \, x^{2} + 2 \, x e^{\left (-2 \, x + 2\right )} + e^{\left (-2 \, x + 4\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.08, size = 24, normalized size = 0.89




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.39, size = 46, normalized size = 1.70 \begin {gather*} -2 \, {\rm Ei}\left (-2 \, x\right ) e^{4} + \frac {1}{2} \, {\left (2 \, x + 1\right )} e^{\left (-2 \, x\right )} + 2 \, e^{4} \Gamma \left (-1, 2 \, x\right ) + 4 \, x - \frac {1}{2} \, e^{\left (-2 \, x\right )} + 2 \, e^{\left (-2 \, x + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.14, size = 28, normalized size = 1.04 \begin {gather*} 4\,x+2\,{\mathrm {e}}^{2-2\,x}+x\,{\mathrm {e}}^{-2\,x}+\frac {{\mathrm {e}}^{4-2\,x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x + 2*exp(2 - 2*x) + x*exp(-2*x) + exp(4 - 2*x)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x + (x**2 + 2*x*exp(2) + exp(4))*exp(-2*x)/x

________________________________________________________________________________________