Optimal. Leaf size=29 \[ 2 \left (e^4-\frac {2}{x}+x+\frac {1}{4} \left (-2+e^x-2 x-x^2\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 21, normalized size of antiderivative = 0.72, number of steps used = 6, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {12, 14, 2194} \begin {gather*} -\frac {x^2}{2}+x+\frac {e^x}{2}-\frac {4}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2194
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \frac {8+2 x^2+e^x x^2-2 x^3}{x^2} \, dx\\ &=\frac {1}{2} \int \left (e^x-\frac {2 \left (-4-x^2+x^3\right )}{x^2}\right ) \, dx\\ &=\frac {\int e^x \, dx}{2}-\int \frac {-4-x^2+x^3}{x^2} \, dx\\ &=\frac {e^x}{2}-\int \left (-1-\frac {4}{x^2}+x\right ) \, dx\\ &=\frac {e^x}{2}-\frac {4}{x}+x-\frac {x^2}{2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 21, normalized size = 0.72 \begin {gather*} \frac {e^x}{2}-\frac {4}{x}+x-\frac {x^2}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 20, normalized size = 0.69 \begin {gather*} -\frac {x^{3} - 2 \, x^{2} - x e^{x} + 8}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 20, normalized size = 0.69 \begin {gather*} -\frac {x^{3} - 2 \, x^{2} - x e^{x} + 8}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 17, normalized size = 0.59
method | result | size |
default | \(-\frac {x^{2}}{2}+x -\frac {4}{x}+\frac {{\mathrm e}^{x}}{2}\) | \(17\) |
risch | \(-\frac {x^{2}}{2}+x -\frac {4}{x}+\frac {{\mathrm e}^{x}}{2}\) | \(17\) |
norman | \(\frac {-4+x^{2}-\frac {x^{3}}{2}+\frac {{\mathrm e}^{x} x}{2}}{x}\) | \(20\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 16, normalized size = 0.55 \begin {gather*} -\frac {1}{2} \, x^{2} + x - \frac {4}{x} + \frac {1}{2} \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.94, size = 16, normalized size = 0.55 \begin {gather*} x+\frac {{\mathrm {e}}^x}{2}-\frac {4}{x}-\frac {x^2}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.10, size = 14, normalized size = 0.48 \begin {gather*} - \frac {x^{2}}{2} + x + \frac {e^{x}}{2} - \frac {4}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________