Optimal. Leaf size=33 \[ x+\frac {e^{-x} \left (1+\log (2)+\log \left (\frac {2}{x}\right )\right )}{(1-x) \log \left (5 e^2\right )} \]
________________________________________________________________________________________
Rubi [A] time = 1.72, antiderivative size = 50, normalized size of antiderivative = 1.52, number of steps used = 20, number of rules used = 9, integrand size = 68, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {6, 12, 1594, 27, 6742, 2177, 2178, 2197, 2554} \begin {gather*} x+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 12
Rule 27
Rule 1594
Rule 2177
Rule 2178
Rule 2197
Rule 2554
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{\left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )} \, dx\\ &=\frac {\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{x-2 x^2+x^3} \, dx}{2+\log (5)}\\ &=\frac {\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{x \left (1-2 x+x^2\right )} \, dx}{2+\log (5)}\\ &=\frac {\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{(-1+x)^2 x} \, dx}{2+\log (5)}\\ &=\frac {\int \left (2+\frac {e^{-x}}{(-1+x)^2}-\frac {e^{-x}}{(-1+x)^2 x}+\frac {e^{-x} x (1+\log (2))}{(-1+x)^2}+\log (5)+\frac {e^{-x} x \log \left (\frac {2}{x}\right )}{(-1+x)^2}\right ) \, dx}{2+\log (5)}\\ &=x+\frac {\int \frac {e^{-x}}{(-1+x)^2} \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{(-1+x)^2 x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x} x \log \left (\frac {2}{x}\right )}{(-1+x)^2} \, dx}{2+\log (5)}+\frac {(1+\log (2)) \int \frac {e^{-x} x}{(-1+x)^2} \, dx}{2+\log (5)}\\ &=x+\frac {e^{-x}}{(1-x) (2+\log (5))}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}-\frac {\int \left (\frac {e^{-x}}{1-x}+\frac {e^{-x}}{(-1+x)^2}+\frac {e^{-x}}{x}\right ) \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{-1+x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x}}{(1-x) x} \, dx}{2+\log (5)}\\ &=x+\frac {e^{-x}}{(1-x) (2+\log (5))}-\frac {\text {Ei}(1-x)}{e (2+\log (5))}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}+\frac {\int \left (\frac {e^{-x}}{1-x}+\frac {e^{-x}}{x}\right ) \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{1-x} \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{(-1+x)^2} \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{x} \, dx}{2+\log (5)}\\ &=x-\frac {\text {Ei}(-x)}{2+\log (5)}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}+\frac {\int \frac {e^{-x}}{1-x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x}}{-1+x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x}}{x} \, dx}{2+\log (5)}\\ &=x+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.80, size = 39, normalized size = 1.18 \begin {gather*} \frac {e^{-x} \left (-1+e^x (-1+x) x (2+\log (5))-\log \left (\frac {4}{x}\right )\right )}{(-1+x) (2+\log (5))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.74, size = 54, normalized size = 1.64 \begin {gather*} \frac {{\left ({\left (2 \, x^{2} + {\left (x^{2} - x\right )} \log \relax (5) - 2 \, x\right )} e^{x} - \log \relax (2) - \log \left (\frac {2}{x}\right ) - 1\right )} e^{\left (-x\right )}}{{\left (x - 1\right )} \log \relax (5) + 2 \, x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 54, normalized size = 1.64 \begin {gather*} \frac {x^{2} \log \relax (5) + 2 \, x^{2} - x \log \relax (5) - 2 \, e^{\left (-x\right )} \log \relax (2) + e^{\left (-x\right )} \log \relax (x) - 2 \, x - e^{\left (-x\right )}}{{\left (x - 1\right )} \log \left (5 \, e^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 41, normalized size = 1.24
method | result | size |
default | \(\frac {\frac {\left (-1-\ln \relax (2)-\ln \left (\frac {2}{x}\right )\right ) {\mathrm e}^{-x}}{x -1}+\ln \left (5 \,{\mathrm e}^{2}\right ) x}{\ln \left (5 \,{\mathrm e}^{2}\right )}\) | \(41\) |
norman | \(\frac {\left (-{\mathrm e}^{x}+{\mathrm e}^{x} x^{2}-\frac {1+\ln \relax (2)}{2+\ln \relax (5)}-\frac {\ln \left (\frac {2}{x}\right )}{2+\ln \relax (5)}\right ) {\mathrm e}^{-x}}{x -1}\) | \(48\) |
risch | \(\frac {{\mathrm e}^{-x} \ln \relax (x )}{\left (2+\ln \relax (5)\right ) \left (x -1\right )}-\frac {\left (2-2 x^{2} \ln \relax (5) {\mathrm e}^{x}+2 x \,{\mathrm e}^{x} \ln \relax (5)-4 \,{\mathrm e}^{x} x^{2}+4 \,{\mathrm e}^{x} x +4 \ln \relax (2)\right ) {\mathrm e}^{-x}}{2 \left (2+\ln \relax (5)\right ) \left (x -1\right )}\) | \(71\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.51, size = 45, normalized size = 1.36 \begin {gather*} \frac {x^{2} {\left (\log \relax (5) + 2\right )} - x {\left (\log \relax (5) + 2\right )} - {\left (2 \, \log \relax (2) - \log \relax (x) + 1\right )} e^{\left (-x\right )}}{{\left (x - 1\right )} \log \left (5 \, e^{2}\right )} \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 (x+x^2\,\ln \relax (2)+x^2+x^2\,\ln \left (\frac {2}{x}\right )+\ln \left (5\,{\mathrm {e}}^2\right )\,{\mathrm {e}}^x\,\left (x^3-2\,x^2+x\right )-1\right )}{\ln \left (5\,{\mathrm {e}}^2\right )\,\left (x^3-2\,x^2+x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.54, size = 29, normalized size = 0.88 \begin {gather*} x + \frac {\left (- \log {\left (\frac {2}{x} \right )} - 1 - \log {\relax (2 )}\right ) e^{- x}}{x \log {\relax (5 )} + 2 x - 2 - \log {\relax (5 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________