Optimal. Leaf size=29 \[ -x+e^{-x} \left (-\frac {1}{5}+\frac {2}{x}+x \log \left (e^2+4 x\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 3.57, antiderivative size = 57, normalized size of antiderivative = 1.97, number of steps used = 19, number of rules used = 10, integrand size = 101, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.099, Rules used = {1593, 6742, 6688, 2194, 2177, 2178, 2176, 2554, 12, 2199} \begin {gather*} -x-\frac {e^{-x}}{5}+\frac {2 e^{-x}}{x}+e^{-x} \log \left (4 x+e^2\right )-e^{-x} (1-x) \log \left (4 x+e^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1593
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 2554
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{x^2 \left (5 e^2+20 x\right )} \, dx\\ &=\int \left (-1+\frac {e^{-x} \left (-10 e^2-40 \left (1+\frac {e^2}{4}\right ) x-40 \left (1-\frac {e^2}{40}\right ) x^2+24 x^3+5 e^2 x^2 \log \left (e^2+4 x\right )+20 \left (1-\frac {e^2}{4}\right ) x^3 \log \left (e^2+4 x\right )-20 x^4 \log \left (e^2+4 x\right )\right )}{5 x^2 \left (e^2+4 x\right )}\right ) \, dx\\ &=-x+\frac {1}{5} \int \frac {e^{-x} \left (-10 e^2-40 \left (1+\frac {e^2}{4}\right ) x-40 \left (1-\frac {e^2}{40}\right ) x^2+24 x^3+5 e^2 x^2 \log \left (e^2+4 x\right )+20 \left (1-\frac {e^2}{4}\right ) x^3 \log \left (e^2+4 x\right )-20 x^4 \log \left (e^2+4 x\right )\right )}{x^2 \left (e^2+4 x\right )} \, dx\\ &=-x+\frac {1}{5} \int \frac {e^{-x} \left (e^2 \left (-10-10 x+x^2\right )+8 x \left (-5-5 x+3 x^2\right )-5 (-1+x) x^2 \left (e^2+4 x\right ) \log \left (e^2+4 x\right )\right )}{x^2 \left (e^2+4 x\right )} \, dx\\ &=-x+\frac {1}{5} \int \left (\frac {e^{-x} \left (-10 e^2-10 \left (4+e^2\right ) x-\left (40-e^2\right ) x^2+24 x^3\right )}{x^2 \left (e^2+4 x\right )}-5 e^{-x} (-1+x) \log \left (e^2+4 x\right )\right ) \, dx\\ &=-x+\frac {1}{5} \int \frac {e^{-x} \left (-10 e^2-10 \left (4+e^2\right ) x-\left (40-e^2\right ) x^2+24 x^3\right )}{x^2 \left (e^2+4 x\right )} \, dx-\int e^{-x} (-1+x) \log \left (e^2+4 x\right ) \, dx\\ &=-x+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )+\frac {1}{5} \int \left (6 e^{-x}-\frac {10 e^{-x}}{x^2}-\frac {10 e^{-x}}{x}-\frac {5 e^{2-x}}{e^2+4 x}\right ) \, dx+\int \frac {4 e^{-x} x}{-e^2-4 x} \, dx\\ &=-x+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )+\frac {6}{5} \int e^{-x} \, dx-2 \int \frac {e^{-x}}{x^2} \, dx-2 \int \frac {e^{-x}}{x} \, dx+4 \int \frac {e^{-x} x}{-e^2-4 x} \, dx-\int \frac {e^{2-x}}{e^2+4 x} \, dx\\ &=-\frac {6 e^{-x}}{5}+\frac {2 e^{-x}}{x}-x-\frac {1}{4} e^{2+\frac {e^2}{4}} \text {Ei}\left (\frac {1}{4} \left (-e^2-4 x\right )\right )-2 \text {Ei}(-x)+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )+2 \int \frac {e^{-x}}{x} \, dx+4 \int \left (-\frac {e^{-x}}{4}+\frac {e^{2-x}}{4 \left (e^2+4 x\right )}\right ) \, dx\\ &=-\frac {6 e^{-x}}{5}+\frac {2 e^{-x}}{x}-x-\frac {1}{4} e^{2+\frac {e^2}{4}} \text {Ei}\left (\frac {1}{4} \left (-e^2-4 x\right )\right )+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )-\int e^{-x} \, dx+\int \frac {e^{2-x}}{e^2+4 x} \, dx\\ &=-\frac {e^{-x}}{5}+\frac {2 e^{-x}}{x}-x+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 37, normalized size = 1.28 \begin {gather*} \frac {1}{5} \left (e^{-x} \left (-1+\frac {10}{x}\right )-5 x+5 e^{-x} x \log \left (e^2+4 x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 31, normalized size = 1.07 \begin {gather*} -\frac {{\left (5 \, x^{2} e^{x} - 5 \, x^{2} \log \left (4 \, x + e^{2}\right ) + x - 10\right )} e^{\left (-x\right )}}{5 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 31, normalized size = 1.07 \begin {gather*} -\frac {{\left (5 \, x^{2} e^{x} - 5 \, x^{2} \log \left (4 \, x + e^{2}\right ) + x - 10\right )} e^{\left (-x\right )}}{5 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.30, size = 31, normalized size = 1.07
method | result | size |
default | \(-x +\frac {\left (10-x +5 x^{2} \ln \left ({\mathrm e}^{2}+4 x \right )\right ) {\mathrm e}^{-x}}{5 x}\) | \(31\) |
norman | \(\frac {\left (2+x^{2} \ln \left ({\mathrm e}^{2}+4 x \right )-\frac {x}{5}-{\mathrm e}^{x} x^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(32\) |
risch | \(x \,{\mathrm e}^{-x} \ln \left ({\mathrm e}^{2}+4 x \right )-\frac {\left (5 \,{\mathrm e}^{x} x^{2}+x -10\right ) {\mathrm e}^{-x}}{5 x}\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 36, normalized size = 1.24 \begin {gather*} \frac {5 \, x^{2} e^{\left (-x\right )} \log \left (4 \, x + e^{2}\right ) - 5 \, x^{2} - {\left (x - 10\right )} e^{\left (-x\right )}}{5 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int -\frac {{\mathrm {e}}^{-x}\,\left (40\,x+{\mathrm {e}}^2\,\left (-x^2+10\,x+10\right )+{\mathrm {e}}^x\,\left (20\,x^3+5\,{\mathrm {e}}^2\,x^2\right )-\ln \left (4\,x+{\mathrm {e}}^2\right )\,\left ({\mathrm {e}}^2\,\left (5\,x^2-5\,x^3\right )+20\,x^3-20\,x^4\right )+40\,x^2-24\,x^3\right )}{20\,x^3+5\,{\mathrm {e}}^2\,x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.36, size = 24, normalized size = 0.83 \begin {gather*} - x + \frac {\left (5 x^{2} \log {\left (4 x + e^{2} \right )} - x + 10\right ) e^{- x}}{5 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________