Optimal. Leaf size=24 \[ 1+\frac {x \left (-1+x+e^{-x} \log ^2(\log (3))\right )}{-2+\log (x)} \]
________________________________________________________________________________________
Rubi [A] time = 0.91, antiderivative size = 45, normalized size of antiderivative = 1.88, number of steps used = 21, number of rules used = 8, integrand size = 64, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6741, 6742, 2320, 2330, 2299, 2178, 2309, 2288} \begin {gather*} \frac {(1-x) x}{2-\log (x)}-\frac {e^{-x} \log ^2(\log (3)) (2 x-x \log (x))}{(2-\log (x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2178
Rule 2288
Rule 2299
Rule 2309
Rule 2320
Rule 2330
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (e^x (3-5 x)+e^x (-1+2 x) \log (x)+(-3+2 x+(1-x) \log (x)) \log ^2(\log (3))\right )}{(2-\log (x))^2} \, dx\\ &=\int \left (\frac {3-5 x-\log (x)+2 x \log (x)}{(-2+\log (x))^2}-\frac {e^{-x} (3-2 x-\log (x)+x \log (x)) \log ^2(\log (3))}{(-2+\log (x))^2}\right ) \, dx\\ &=-\left (\log ^2(\log (3)) \int \frac {e^{-x} (3-2 x-\log (x)+x \log (x))}{(-2+\log (x))^2} \, dx\right )+\int \frac {3-5 x-\log (x)+2 x \log (x)}{(-2+\log (x))^2} \, dx\\ &=-\frac {e^{-x} (2 x-x \log (x)) \log ^2(\log (3))}{(2-\log (x))^2}+\int \left (\frac {1-x}{(-2+\log (x))^2}+\frac {-1+2 x}{-2+\log (x)}\right ) \, dx\\ &=-\frac {e^{-x} (2 x-x \log (x)) \log ^2(\log (3))}{(2-\log (x))^2}+\int \frac {1-x}{(-2+\log (x))^2} \, dx+\int \frac {-1+2 x}{-2+\log (x)} \, dx\\ &=\frac {(1-x) x}{2-\log (x)}-\frac {e^{-x} (2 x-x \log (x)) \log ^2(\log (3))}{(2-\log (x))^2}+2 \int \frac {1-x}{-2+\log (x)} \, dx+\int \left (-\frac {1}{-2+\log (x)}+\frac {2 x}{-2+\log (x)}\right ) \, dx-\int \frac {1}{-2+\log (x)} \, dx\\ &=\frac {(1-x) x}{2-\log (x)}-\frac {e^{-x} (2 x-x \log (x)) \log ^2(\log (3))}{(2-\log (x))^2}+2 \int \left (\frac {1}{-2+\log (x)}-\frac {x}{-2+\log (x)}\right ) \, dx+2 \int \frac {x}{-2+\log (x)} \, dx-\int \frac {1}{-2+\log (x)} \, dx-\operatorname {Subst}\left (\int \frac {e^x}{-2+x} \, dx,x,\log (x)\right )\\ &=-e^2 \text {Ei}(-2+\log (x))+\frac {(1-x) x}{2-\log (x)}-\frac {e^{-x} (2 x-x \log (x)) \log ^2(\log (3))}{(2-\log (x))^2}+2 \int \frac {1}{-2+\log (x)} \, dx-2 \int \frac {x}{-2+\log (x)} \, dx+2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-2+x} \, dx,x,\log (x)\right )-\operatorname {Subst}\left (\int \frac {e^x}{-2+x} \, dx,x,\log (x)\right )\\ &=2 e^4 \text {Ei}(-2 (2-\log (x)))-2 e^2 \text {Ei}(-2+\log (x))+\frac {(1-x) x}{2-\log (x)}-\frac {e^{-x} (2 x-x \log (x)) \log ^2(\log (3))}{(2-\log (x))^2}+2 \operatorname {Subst}\left (\int \frac {e^x}{-2+x} \, dx,x,\log (x)\right )-2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-2+x} \, dx,x,\log (x)\right )\\ &=\frac {(1-x) x}{2-\log (x)}-\frac {e^{-x} (2 x-x \log (x)) \log ^2(\log (3))}{(2-\log (x))^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.33, size = 22, normalized size = 0.92 \begin {gather*} \frac {x \left (-1+x+e^{-x} \log ^2(\log (3))\right )}{-2+\log (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.92, size = 31, normalized size = 1.29 \begin {gather*} \frac {x \log \left (\log \relax (3)\right )^{2} + {\left (x^{2} - x\right )} e^{x}}{e^{x} \log \relax (x) - 2 \, e^{x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 25, normalized size = 1.04 \begin {gather*} \frac {x e^{\left (-x\right )} \log \left (\log \relax (3)\right )^{2} + x^{2} - x}{\log \relax (x) - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 27, normalized size = 1.12
method | result | size |
risch | \(\frac {x \left (\ln \left (\ln \relax (3)\right )^{2}+{\mathrm e}^{x} x -{\mathrm e}^{x}\right ) {\mathrm e}^{-x}}{\ln \relax (x )-2}\) | \(27\) |
norman | \(\frac {\left ({\mathrm e}^{x} x^{2}+\ln \left (\ln \relax (3)\right )^{2} x -{\mathrm e}^{x} x \right ) {\mathrm e}^{-x}}{\ln \relax (x )-2}\) | \(31\) |
default | \(\frac {x^{2}-x}{\ln \relax (x )-2}+\frac {\ln \left (\ln \relax (3)\right )^{2} x \,{\mathrm e}^{-x}}{\ln \relax (x )-2}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.57, size = 25, normalized size = 1.04 \begin {gather*} \frac {x e^{\left (-x\right )} \log \left (\log \relax (3)\right )^{2} + x^{2} - x}{\log \relax (x) - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.38, size = 26, normalized size = 1.08 \begin {gather*} \frac {x\,{\mathrm {e}}^{-x}\,\left ({\ln \left (\ln \relax (3)\right )}^2-{\mathrm {e}}^x+x\,{\mathrm {e}}^x\right )}{\ln \relax (x)-2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.31, size = 26, normalized size = 1.08 \begin {gather*} \frac {x e^{- x} \log {\left (\log {\relax (3 )} \right )}^{2}}{\log {\relax (x )} - 2} + \frac {x^{2} - x}{\log {\relax (x )} - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________