Optimal. Leaf size=20 \[ \frac {2 \left (3+x \left (4+e^4+x\right ) \left (e^x+x\right )\right )}{x^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 27, normalized size of antiderivative = 1.35, number of steps used = 10, number of rules used = 5, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {14, 2199, 2194, 2177, 2178} \begin {gather*} \frac {6}{x^2}+2 x+2 e^x+\frac {2 \left (4+e^4\right ) e^x}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {2 e^x \left (-4-e^4+\left (4+e^4\right ) x+x^2\right )}{x^2}+\frac {2 \left (-6+x^3\right )}{x^3}\right ) \, dx\\ &=2 \int \frac {e^x \left (-4-e^4+\left (4+e^4\right ) x+x^2\right )}{x^2} \, dx+2 \int \frac {-6+x^3}{x^3} \, dx\\ &=2 \int \left (1-\frac {6}{x^3}\right ) \, dx+2 \int \left (e^x+\frac {e^x \left (-4-e^4\right )}{x^2}+\frac {e^x \left (4+e^4\right )}{x}\right ) \, dx\\ &=\frac {6}{x^2}+2 x+2 \int e^x \, dx-\left (2 \left (4+e^4\right )\right ) \int \frac {e^x}{x^2} \, dx+\left (2 \left (4+e^4\right )\right ) \int \frac {e^x}{x} \, dx\\ &=2 e^x+\frac {6}{x^2}+\frac {2 e^x \left (4+e^4\right )}{x}+2 x+2 \left (4+e^4\right ) \text {Ei}(x)-\left (2 \left (4+e^4\right )\right ) \int \frac {e^x}{x} \, dx\\ &=2 e^x+\frac {6}{x^2}+\frac {2 e^x \left (4+e^4\right )}{x}+2 x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 27, normalized size = 1.35 \begin {gather*} 2 \left (\frac {3}{x^2}+x+\frac {e^x \left (\left (4+e^4\right ) x+x^2\right )}{x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.94, size = 24, normalized size = 1.20 \begin {gather*} \frac {2 \, {\left (x^{3} + {\left (x^{2} + x e^{4} + 4 \, x\right )} e^{x} + 3\right )}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 27, normalized size = 1.35 \begin {gather*} \frac {2 \, {\left (x^{3} + x^{2} e^{x} + x e^{\left (x + 4\right )} + 4 \, x e^{x} + 3\right )}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 22, normalized size = 1.10
method | result | size |
risch | \(2 x +\frac {6}{x^{2}}+\frac {2 \left (x +4+{\mathrm e}^{4}\right ) {\mathrm e}^{x}}{x}\) | \(22\) |
norman | \(\frac {6+\left (2 \,{\mathrm e}^{4}+8\right ) x \,{\mathrm e}^{x}+2 x^{3}+2 \,{\mathrm e}^{x} x^{2}}{x^{2}}\) | \(29\) |
default | \(2 x +\frac {6}{x^{2}}+\frac {8 \,{\mathrm e}^{x}}{x}-2 \,{\mathrm e}^{4} \left (-\frac {{\mathrm e}^{x}}{x}-\expIntegralEi \left (1, -x \right )\right )-2 \,{\mathrm e}^{4} \expIntegralEi \left (1, -x \right )+2 \,{\mathrm e}^{x}\) | \(49\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.47, size = 39, normalized size = 1.95 \begin {gather*} 2 \, {\rm Ei}\relax (x) e^{4} - 2 \, e^{4} \Gamma \left (-1, -x\right ) + 2 \, x + \frac {6}{x^{2}} + 8 \, {\rm Ei}\relax (x) + 2 \, e^{x} - 8 \, \Gamma \left (-1, -x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.28, size = 24, normalized size = 1.20 \begin {gather*} 2\,x+2\,{\mathrm {e}}^x+\frac {x\,{\mathrm {e}}^x\,\left (2\,{\mathrm {e}}^4+8\right )+6}{x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 22, normalized size = 1.10 \begin {gather*} 2 x + \frac {\left (2 x + 8 + 2 e^{4}\right ) e^{x}}{x} + \frac {6}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________