Optimal. Leaf size=24 \[ -5+\frac {9 \left (e^x+3 \left (3+e^{\log ^2(x)}\right )+x\right )^2}{x^2} \]
________________________________________________________________________________________
Rubi [B] time = 0.72, antiderivative size = 80, normalized size of antiderivative = 3.33, number of steps used = 16, number of rules used = 7, integrand size = 83, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.084, Rules used = {14, 2197, 37, 2199, 2177, 2178, 2288} \begin {gather*} \frac {9 (x+9)^2}{x^2}+\frac {162 e^x}{x^2}+\frac {9 e^{2 x}}{x^2}+\frac {54 e^{\log ^2(x)} \left (e^x \log (x)+x \log (x)+9 \log (x)\right )}{x^2 \log (x)}+\frac {81 e^{2 \log ^2(x)}}{x^2}+\frac {18 e^x}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 37
Rule 2177
Rule 2178
Rule 2197
Rule 2199
Rule 2288
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {18 \left (-81-18 e^x-e^{2 x}-9 x+8 e^x x+e^{2 x} x+e^x x^2\right )}{x^3}+\frac {162 e^{2 \log ^2(x)} (-1+2 \log (x))}{x^3}+\frac {54 e^{\log ^2(x)} \left (-18-2 e^x-x+e^x x+18 \log (x)+2 e^x \log (x)+2 x \log (x)\right )}{x^3}\right ) \, dx\\ &=18 \int \frac {-81-18 e^x-e^{2 x}-9 x+8 e^x x+e^{2 x} x+e^x x^2}{x^3} \, dx+54 \int \frac {e^{\log ^2(x)} \left (-18-2 e^x-x+e^x x+18 \log (x)+2 e^x \log (x)+2 x \log (x)\right )}{x^3} \, dx+162 \int \frac {e^{2 \log ^2(x)} (-1+2 \log (x))}{x^3} \, dx\\ &=\frac {81 e^{2 \log ^2(x)}}{x^2}+\frac {54 e^{\log ^2(x)} \left (9 \log (x)+e^x \log (x)+x \log (x)\right )}{x^2 \log (x)}+18 \int \left (\frac {e^{2 x} (-1+x)}{x^3}-\frac {9 (9+x)}{x^3}+\frac {e^x \left (-18+8 x+x^2\right )}{x^3}\right ) \, dx\\ &=\frac {81 e^{2 \log ^2(x)}}{x^2}+\frac {54 e^{\log ^2(x)} \left (9 \log (x)+e^x \log (x)+x \log (x)\right )}{x^2 \log (x)}+18 \int \frac {e^{2 x} (-1+x)}{x^3} \, dx+18 \int \frac {e^x \left (-18+8 x+x^2\right )}{x^3} \, dx-162 \int \frac {9+x}{x^3} \, dx\\ &=\frac {9 e^{2 x}}{x^2}+\frac {81 e^{2 \log ^2(x)}}{x^2}+\frac {9 (9+x)^2}{x^2}+\frac {54 e^{\log ^2(x)} \left (9 \log (x)+e^x \log (x)+x \log (x)\right )}{x^2 \log (x)}+18 \int \left (-\frac {18 e^x}{x^3}+\frac {8 e^x}{x^2}+\frac {e^x}{x}\right ) \, dx\\ &=\frac {9 e^{2 x}}{x^2}+\frac {81 e^{2 \log ^2(x)}}{x^2}+\frac {9 (9+x)^2}{x^2}+\frac {54 e^{\log ^2(x)} \left (9 \log (x)+e^x \log (x)+x \log (x)\right )}{x^2 \log (x)}+18 \int \frac {e^x}{x} \, dx+144 \int \frac {e^x}{x^2} \, dx-324 \int \frac {e^x}{x^3} \, dx\\ &=\frac {162 e^x}{x^2}+\frac {9 e^{2 x}}{x^2}+\frac {81 e^{2 \log ^2(x)}}{x^2}-\frac {144 e^x}{x}+\frac {9 (9+x)^2}{x^2}+18 \text {Ei}(x)+\frac {54 e^{\log ^2(x)} \left (9 \log (x)+e^x \log (x)+x \log (x)\right )}{x^2 \log (x)}+144 \int \frac {e^x}{x} \, dx-162 \int \frac {e^x}{x^2} \, dx\\ &=\frac {162 e^x}{x^2}+\frac {9 e^{2 x}}{x^2}+\frac {81 e^{2 \log ^2(x)}}{x^2}+\frac {18 e^x}{x}+\frac {9 (9+x)^2}{x^2}+162 \text {Ei}(x)+\frac {54 e^{\log ^2(x)} \left (9 \log (x)+e^x \log (x)+x \log (x)\right )}{x^2 \log (x)}-162 \int \frac {e^x}{x} \, dx\\ &=\frac {162 e^x}{x^2}+\frac {9 e^{2 x}}{x^2}+\frac {81 e^{2 \log ^2(x)}}{x^2}+\frac {18 e^x}{x}+\frac {9 (9+x)^2}{x^2}+\frac {54 e^{\log ^2(x)} \left (9 \log (x)+e^x \log (x)+x \log (x)\right )}{x^2 \log (x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.79, size = 34, normalized size = 1.42 \begin {gather*} \frac {9 \left (9+e^x+3 e^{\log ^2(x)}\right ) \left (9+e^x+3 e^{\log ^2(x)}+2 x\right )}{x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 42, normalized size = 1.75 \begin {gather*} \frac {9 \, {\left (6 \, {\left (x + e^{x} + 9\right )} e^{\left (\log \relax (x)^{2}\right )} + 2 \, {\left (x + 9\right )} e^{x} + 18 \, x + 9 \, e^{\left (2 \, \log \relax (x)^{2}\right )} + e^{\left (2 \, x\right )} + 81\right )}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 56, normalized size = 2.33 \begin {gather*} \frac {9 \, {\left (6 \, x e^{\left (\log \relax (x)^{2}\right )} + 2 \, x e^{x} + 18 \, x + 9 \, e^{\left (2 \, \log \relax (x)^{2}\right )} + 6 \, e^{\left (\log \relax (x)^{2} + x\right )} + 54 \, e^{\left (\log \relax (x)^{2}\right )} + e^{\left (2 \, x\right )} + 18 \, e^{x} + 81\right )}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 52, normalized size = 2.17
method | result | size |
risch | \(\frac {18 \,{\mathrm e}^{x} x +9 \,{\mathrm e}^{2 x}+162 x +162 \,{\mathrm e}^{x}+729}{x^{2}}+\frac {81 \,{\mathrm e}^{2 \ln \relax (x )^{2}}}{x^{2}}+\frac {54 \left (x +{\mathrm e}^{x}+9\right ) {\mathrm e}^{\ln \relax (x )^{2}}}{x^{2}}\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {81}{2} i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (i \, \sqrt {2} \log \relax (x) - \frac {1}{2} i \, \sqrt {2}\right ) e^{\left (-\frac {1}{2}\right )} + 27 i \, \sqrt {\pi } \operatorname {erf}\left (i \, \log \relax (x) - \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} + 486 i \, \sqrt {\pi } \operatorname {erf}\left (i \, \log \relax (x) - i\right ) e^{\left (-1\right )} + \frac {162}{x} + \frac {54 \, e^{\left (\log \relax (x)^{2} + x\right )}}{x^{2}} + \frac {729}{x^{2}} + 18 \, {\rm Ei}\relax (x) + 144 \, \Gamma \left (-1, -x\right ) + 36 \, \Gamma \left (-1, -2 \, x\right ) + 324 \, \Gamma \left (-2, -x\right ) + 72 \, \Gamma \left (-2, -2 \, x\right ) + 18 \, \int \frac {6 \, {\left (x + 9\right )} e^{\left (\log \relax (x)^{2}\right )} \log \relax (x)}{x^{3}}\,{d x} + 324 \, \int \frac {e^{\left (2 \, \log \relax (x)^{2}\right )} \log \relax (x)}{x^{3}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.78, size = 30, normalized size = 1.25 \begin {gather*} \frac {9\,\left (3\,{\mathrm {e}}^{{\ln \relax (x)}^2}+{\mathrm {e}}^x+9\right )\,\left (2\,x+3\,{\mathrm {e}}^{{\ln \relax (x)}^2}+{\mathrm {e}}^x+9\right )}{x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.63, size = 82, normalized size = 3.42 \begin {gather*} - \frac {- 162 x - 729}{x^{2}} + \frac {9 x^{2} e^{2 x} + \left (18 x^{3} + 54 x^{2} e^{\log {\relax (x )}^{2}} + 162 x^{2}\right ) e^{x}}{x^{4}} + \frac {81 x^{2} e^{2 \log {\relax (x )}^{2}} + \left (54 x^{3} + 486 x^{2}\right ) e^{\log {\relax (x )}^{2}}}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________