Optimal. Leaf size=25 \[ -e^3+x+\frac {(2-x) \left (5-e^x+\log (3)\right )}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 22, normalized size of antiderivative = 0.88, number of steps used = 10, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {14, 2199, 2194, 2177, 2178} \begin {gather*} x+e^x-\frac {2 e^x}{x}+\frac {2 (5+\log (3))}{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 {e^x \left (2-2 x+x^2\right )}{x^2}+\frac {-10+x^2-2 \log (3)}{x^2}\right ) \, dx\\ &=\int \frac {e^x \left (2-2 x+x^2\right )}{x^2} \, dx+\int \frac {-10+x^2-2 \log (3)}{x^2} \, dx\\ &=\int \left (e^x+\frac {2 e^x}{x^2}-\frac {2 e^x}{x}\right ) \, dx+\int \left (1-\frac {2 (5+\log (3))}{x^2}\right ) \, dx\\ &=x+\frac {2 (5+\log (3))}{x}+2 \int \frac {e^x}{x^2} \, dx-2 \int \frac {e^x}{x} \, dx+\int e^x \, dx\\ &=e^x-\frac {2 e^x}{x}+x-2 \text {Ei}(x)+\frac {2 (5+\log (3))}{x}+2 \int \frac {e^x}{x} \, dx\\ &=e^x-\frac {2 e^x}{x}+x+\frac {2 (5+\log (3))}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 18, normalized size = 0.72 \begin {gather*} \frac {10+e^x (-2+x)+x^2+\log (9)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 19, normalized size = 0.76 \begin {gather*} \frac {x^{2} + {\left (x - 2\right )} e^{x} + 2 \, \log \relax (3) + 10}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 21, normalized size = 0.84 \begin {gather*} \frac {x^{2} + x e^{x} - 2 \, e^{x} + 2 \, \log \relax (3) + 10}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 22, normalized size = 0.88
method | result | size |
norman | \(\frac {x^{2}+{\mathrm e}^{x} x -2 \,{\mathrm e}^{x}+2 \ln \relax (3)+10}{x}\) | \(22\) |
default | \(x +\frac {10}{x}+\frac {2 \ln \relax (3)}{x}-\frac {2 \,{\mathrm e}^{x}}{x}+{\mathrm e}^{x}\) | \(24\) |
risch | \(x +\frac {2 \ln \relax (3)}{x}+\frac {10}{x}+\frac {\left (x -2\right ) {\mathrm e}^{x}}{x}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.51, size = 27, normalized size = 1.08 \begin {gather*} x + \frac {2 \, \log \relax (3)}{x} + \frac {10}{x} - 2 \, {\rm Ei}\relax (x) + e^{x} + 2 \, \Gamma \left (-1, -x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 16, normalized size = 0.64 \begin {gather*} x+{\mathrm {e}}^x+\frac {\ln \relax (9)-2\,{\mathrm {e}}^x+10}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 17, normalized size = 0.68 \begin {gather*} x + \frac {\left (x - 2\right ) e^{x}}{x} + \frac {2 \log {\relax (3 )} + 10}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________