Optimal. Leaf size=28 \[ \frac {1}{3} \left (2+e^x\right ) \left (\frac {3}{x}+\frac {1-x}{x}\right )+8 x \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {12, 14, 2199, 2194, 2177, 2178} \begin {gather*} 8 x-\frac {e^x}{3}+\frac {4 e^x}{3 x}+\frac {8}{3 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{3} \int \frac {-8+24 x^2+e^x \left (-4+4 x-x^2\right )}{x^2} \, dx\\ &=\frac {1}{3} \int \left (-\frac {e^x (-2+x)^2}{x^2}+\frac {8 \left (-1+3 x^2\right )}{x^2}\right ) \, dx\\ &=-\left (\frac {1}{3} \int \frac {e^x (-2+x)^2}{x^2} \, dx\right )+\frac {8}{3} \int \frac {-1+3 x^2}{x^2} \, dx\\ &=-\left (\frac {1}{3} \int \left (e^x+\frac {4 e^x}{x^2}-\frac {4 e^x}{x}\right ) \, dx\right )+\frac {8}{3} \int \left (3-\frac {1}{x^2}\right ) \, dx\\ &=\frac {8}{3 x}+8 x-\frac {\int e^x \, dx}{3}-\frac {4}{3} \int \frac {e^x}{x^2} \, dx+\frac {4}{3} \int \frac {e^x}{x} \, dx\\ &=-\frac {e^x}{3}+\frac {8}{3 x}+\frac {4 e^x}{3 x}+8 x+\frac {4 \text {Ei}(x)}{3}-\frac {4}{3} \int \frac {e^x}{x} \, dx\\ &=-\frac {e^x}{3}+\frac {8}{3 x}+\frac {4 e^x}{3 x}+8 x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 26, normalized size = 0.93 \begin {gather*} \frac {1}{3} \left (-e^x+\frac {8}{x}+\frac {4 e^x}{x}+24 x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 19, normalized size = 0.68 \begin {gather*} \frac {24 \, x^{2} - {\left (x - 4\right )} e^{x} + 8}{3 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 21, normalized size = 0.75 \begin {gather*} \frac {24 \, x^{2} - x e^{x} + 4 \, e^{x} + 8}{3 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 20, normalized size = 0.71
method | result | size |
risch | \(8 x +\frac {8}{3 x}-\frac {\left (x -4\right ) {\mathrm e}^{x}}{3 x}\) | \(20\) |
default | \(8 x +\frac {8}{3 x}+\frac {4 \,{\mathrm e}^{x}}{3 x}-\frac {{\mathrm e}^{x}}{3}\) | \(21\) |
norman | \(\frac {\frac {8}{3}+8 x^{2}-\frac {{\mathrm e}^{x} x}{3}+\frac {4 \,{\mathrm e}^{x}}{3}}{x}\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.40, size = 24, normalized size = 0.86 \begin {gather*} 8 \, x + \frac {8}{3 \, x} + \frac {4}{3} \, {\rm Ei}\relax (x) - \frac {1}{3} \, e^{x} - \frac {4}{3} \, \Gamma \left (-1, -x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 18, normalized size = 0.64 \begin {gather*} 8\,x-\frac {{\mathrm {e}}^x}{3}+\frac {\frac {4\,{\mathrm {e}}^x}{3}+\frac {8}{3}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 17, normalized size = 0.61 \begin {gather*} 8 x + \frac {\left (4 - x\right ) e^{x}}{3 x} + \frac {8}{3 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________