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]
[Out]
Rule 6
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 6742
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________