Optimal. Leaf size=25 \[ 2-25 e^{2 x}+\left (2+e^x-\frac {9}{x^2}-x\right )^2+x \]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 48, normalized size of antiderivative = 1.92, number of steps used = 15, number of rules used = 6, integrand size = 61, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {14, 2194, 2199, 2177, 2178, 2176} \begin {gather*} \frac {81}{x^4}+x^2-\frac {18 e^x}{x^2}-\frac {36}{x^2}-2 e^x x-3 x+4 e^x-24 e^{2 x}+\frac {18}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-48 e^{2 x}-\frac {2 e^x \left (-18+9 x-x^3+x^4\right )}{x^3}+\frac {-324+72 x^2-18 x^3-3 x^5+2 x^6}{x^5}\right ) \, dx\\ &=-\left (2 \int \frac {e^x \left (-18+9 x-x^3+x^4\right )}{x^3} \, dx\right )-48 \int e^{2 x} \, dx+\int \frac {-324+72 x^2-18 x^3-3 x^5+2 x^6}{x^5} \, dx\\ &=-24 e^{2 x}-2 \int \left (-e^x-\frac {18 e^x}{x^3}+\frac {9 e^x}{x^2}+e^x x\right ) \, dx+\int \left (-3-\frac {324}{x^5}+\frac {72}{x^3}-\frac {18}{x^2}+2 x\right ) \, dx\\ &=-24 e^{2 x}+\frac {81}{x^4}-\frac {36}{x^2}+\frac {18}{x}-3 x+x^2+2 \int e^x \, dx-2 \int e^x x \, dx-18 \int \frac {e^x}{x^2} \, dx+36 \int \frac {e^x}{x^3} \, dx\\ &=2 e^x-24 e^{2 x}+\frac {81}{x^4}-\frac {36}{x^2}-\frac {18 e^x}{x^2}+\frac {18}{x}+\frac {18 e^x}{x}-3 x-2 e^x x+x^2+2 \int e^x \, dx+18 \int \frac {e^x}{x^2} \, dx-18 \int \frac {e^x}{x} \, dx\\ &=4 e^x-24 e^{2 x}+\frac {81}{x^4}-\frac {36}{x^2}-\frac {18 e^x}{x^2}+\frac {18}{x}-3 x-2 e^x x+x^2-18 \text {Ei}(x)+18 \int \frac {e^x}{x} \, dx\\ &=4 e^x-24 e^{2 x}+\frac {81}{x^4}-\frac {36}{x^2}-\frac {18 e^x}{x^2}+\frac {18}{x}-3 x-2 e^x x+x^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 46, normalized size = 1.84 \begin {gather*} -4 e^x \left (-1+6 e^x\right )+\frac {81}{x^4}-\frac {18 \left (2+e^x\right )}{x^2}+\frac {18}{x}-\left (3+2 e^x\right ) x+x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.22, size = 51, normalized size = 2.04 \begin {gather*} \frac {x^{6} - 3 \, x^{5} - 24 \, x^{4} e^{\left (2 \, x\right )} + 18 \, x^{3} - 36 \, x^{2} - 2 \, {\left (x^{5} - 2 \, x^{4} + 9 \, x^{2}\right )} e^{x} + 81}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 54, normalized size = 2.16 \begin {gather*} \frac {x^{6} - 2 \, x^{5} e^{x} - 3 \, x^{5} - 24 \, x^{4} e^{\left (2 \, x\right )} + 4 \, x^{4} e^{x} + 18 \, x^{3} - 18 \, x^{2} e^{x} - 36 \, x^{2} + 81}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 45, normalized size = 1.80
method | result | size |
default | \(x^{2}-3 x +\frac {81}{x^{4}}-\frac {36}{x^{2}}+\frac {18}{x}-24 \,{\mathrm e}^{2 x}-\frac {18 \,{\mathrm e}^{x}}{x^{2}}-2 \,{\mathrm e}^{x} x +4 \,{\mathrm e}^{x}\) | \(45\) |
risch | \(x^{2}-3 x +\frac {18 x^{3}-36 x^{2}+81}{x^{4}}-24 \,{\mathrm e}^{2 x}-\frac {2 \left (x^{3}-2 x^{2}+9\right ) {\mathrm e}^{x}}{x^{2}}\) | \(47\) |
norman | \(\frac {81+x^{6}-36 x^{2}+18 x^{3}-3 x^{5}-2 x^{5} {\mathrm e}^{x}-18 \,{\mathrm e}^{x} x^{2}+4 \,{\mathrm e}^{x} x^{4}-24 \,{\mathrm e}^{2 x} x^{4}}{x^{4}}\) | \(55\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.45, size = 53, normalized size = 2.12 \begin {gather*} x^{2} - 2 \, {\left (x - 1\right )} e^{x} - 3 \, x + \frac {18}{x} - \frac {36}{x^{2}} + \frac {81}{x^{4}} - 24 \, e^{\left (2 \, x\right )} + 2 \, e^{x} - 18 \, \Gamma \left (-1, -x\right ) - 36 \, \Gamma \left (-2, -x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 45, normalized size = 1.80 \begin {gather*} 4\,{\mathrm {e}}^x-24\,{\mathrm {e}}^{2\,x}-x\,\left (2\,{\mathrm {e}}^x+3\right )+\frac {18\,x^3-x^2\,\left (18\,{\mathrm {e}}^x+36\right )+81}{x^4}+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.15, size = 49, normalized size = 1.96 \begin {gather*} x^{2} - 3 x + \frac {- 24 x^{2} e^{2 x} + \left (- 2 x^{3} + 4 x^{2} - 18\right ) e^{x}}{x^{2}} + \frac {18 x^{3} - 36 x^{2} + 81}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________