Optimal. Leaf size=29 \[ -2+e^x-x+\frac {-1+3 e^{-e^2}-\frac {4}{x^2}}{\log (x)} \]
________________________________________________________________________________________
Rubi [A] time = 1.02, antiderivative size = 33, normalized size of antiderivative = 1.14, number of steps used = 15, number of rules used = 9, integrand size = 64, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.141, Rules used = {12, 6742, 2194, 2353, 2306, 2309, 2178, 2302, 30} \begin {gather*} -\frac {4}{x^2 \log (x)}-x+e^x-\frac {1-3 e^{-e^2}}{\log (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 30
Rule 2178
Rule 2194
Rule 2302
Rule 2306
Rule 2309
Rule 2353
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=e^{-e^2} \int \frac {-3 x^2+e^{e^2} \left (4+x^2\right )+8 e^{e^2} \log (x)+e^{e^2} \left (-x^3+e^x x^3\right ) \log ^2(x)}{x^3 \log ^2(x)} \, dx\\ &=e^{-e^2} \int \left (e^{e^2+x}+\frac {4 e^{e^2}-3 \left (1-\frac {e^{e^2}}{3}\right ) x^2+8 e^{e^2} \log (x)-e^{e^2} x^3 \log ^2(x)}{x^3 \log ^2(x)}\right ) \, dx\\ &=e^{-e^2} \int e^{e^2+x} \, dx+e^{-e^2} \int \frac {4 e^{e^2}-3 \left (1-\frac {e^{e^2}}{3}\right ) x^2+8 e^{e^2} \log (x)-e^{e^2} x^3 \log ^2(x)}{x^3 \log ^2(x)} \, dx\\ &=e^x+e^{-e^2} \int \left (-e^{e^2}+\frac {4 e^{e^2}-\left (3-e^{e^2}\right ) x^2}{x^3 \log ^2(x)}+\frac {8 e^{e^2}}{x^3 \log (x)}\right ) \, dx\\ &=e^x-x+8 \int \frac {1}{x^3 \log (x)} \, dx+e^{-e^2} \int \frac {4 e^{e^2}+\left (-3+e^{e^2}\right ) x^2}{x^3 \log ^2(x)} \, dx\\ &=e^x-x+8 \operatorname {Subst}\left (\int \frac {e^{-2 x}}{x} \, dx,x,\log (x)\right )+e^{-e^2} \int \left (\frac {4 e^{e^2}}{x^3 \log ^2(x)}+\frac {-3+e^{e^2}}{x \log ^2(x)}\right ) \, dx\\ &=e^x-x+8 \text {Ei}(-2 \log (x))+4 \int \frac {1}{x^3 \log ^2(x)} \, dx+\left (1-3 e^{-e^2}\right ) \int \frac {1}{x \log ^2(x)} \, dx\\ &=e^x-x+8 \text {Ei}(-2 \log (x))-\frac {4}{x^2 \log (x)}-8 \int \frac {1}{x^3 \log (x)} \, dx+\left (1-3 e^{-e^2}\right ) \operatorname {Subst}\left (\int \frac {1}{x^2} \, dx,x,\log (x)\right )\\ &=e^x-x+8 \text {Ei}(-2 \log (x))-\frac {1-3 e^{-e^2}}{\log (x)}-\frac {4}{x^2 \log (x)}-8 \operatorname {Subst}\left (\int \frac {e^{-2 x}}{x} \, dx,x,\log (x)\right )\\ &=e^x-x-\frac {1-3 e^{-e^2}}{\log (x)}-\frac {4}{x^2 \log (x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.32, size = 28, normalized size = 0.97 \begin {gather*} e^x-x+\frac {-1+3 e^{-e^2}-\frac {4}{x^2}}{\log (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.56, size = 46, normalized size = 1.59 \begin {gather*} -\frac {{\left ({\left (x^{3} - x^{2} e^{x}\right )} e^{\left (e^{2}\right )} \log \relax (x) - 3 \, x^{2} + {\left (x^{2} + 4\right )} e^{\left (e^{2}\right )}\right )} e^{\left (-e^{2}\right )}}{x^{2} \log \relax (x)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 53, normalized size = 1.83 \begin {gather*} -\frac {{\left (x^{3} e^{\left (e^{2}\right )} \log \relax (x) - x^{2} e^{\left (x + e^{2}\right )} \log \relax (x) + x^{2} e^{\left (e^{2}\right )} - 3 \, x^{2} + 4 \, e^{\left (e^{2}\right )}\right )} e^{\left (-e^{2}\right )}}{x^{2} \log \relax (x)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 39, normalized size = 1.34
method | result | size |
risch | \(-x +{\mathrm e}^{x}-\frac {{\mathrm e}^{-{\mathrm e}^{2}} \left (x^{2} {\mathrm e}^{{\mathrm e}^{2}}-3 x^{2}+4 \,{\mathrm e}^{{\mathrm e}^{2}}\right )}{x^{2} \ln \relax (x )}\) | \(39\) |
default | \({\mathrm e}^{-{\mathrm e}^{2}} \left ({\mathrm e}^{{\mathrm e}^{2}} {\mathrm e}^{x}-\frac {{\mathrm e}^{{\mathrm e}^{2}}}{\ln \relax (x )}+\frac {3}{\ln \relax (x )}-\frac {4 \,{\mathrm e}^{{\mathrm e}^{2}}}{x^{2} \ln \relax (x )}-x \,{\mathrm e}^{{\mathrm e}^{2}}\right )\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.38, size = 55, normalized size = 1.90 \begin {gather*} -{\left (x e^{\left (e^{2}\right )} - 8 \, {\rm Ei}\left (-2 \, \log \relax (x)\right ) e^{\left (e^{2}\right )} + 8 \, e^{\left (e^{2}\right )} \Gamma \left (-1, 2 \, \log \relax (x)\right ) + \frac {e^{\left (e^{2}\right )}}{\log \relax (x)} - \frac {3}{\log \relax (x)} - e^{\left (x + e^{2}\right )}\right )} e^{\left (-e^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.25, size = 32, normalized size = 1.10 \begin {gather*} {\mathrm {e}}^x-x-\frac {1}{\ln \relax (x)}-\frac {4}{x^2\,\ln \relax (x)}+\frac {3\,{\mathrm {e}}^{-{\mathrm {e}}^2}}{\ln \relax (x)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.28, size = 36, normalized size = 1.24 \begin {gather*} - x + e^{x} + \frac {- x^{2} e^{e^{2}} + 3 x^{2} - 4 e^{e^{2}}}{x^{2} e^{e^{2}} \log {\relax (x )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________