Optimal. Leaf size=25 \[ \frac {18+e^2-e^x+2 x-\frac {6+x}{x}}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 28, normalized size of antiderivative = 1.12, number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {6, 14, 2197, 37} \begin {gather*} -\frac {\left (12-\left (17+e^2\right ) x\right )^2}{24 x^2}-\frac {e^x}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 14
Rule 37
Rule 2197
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {12+\left (-17-e^2\right ) x+e^x \left (x-x^2\right )}{x^3} \, dx\\ &=\int \left (-\frac {e^x (-1+x)}{x^2}+\frac {12-\left (17+e^2\right ) x}{x^3}\right ) \, dx\\ &=-\int \frac {e^x (-1+x)}{x^2} \, dx+\int \frac {12-\left (17+e^2\right ) x}{x^3} \, dx\\ &=-\frac {e^x}{x}-\frac {\left (12-\left (17+e^2\right ) x\right )^2}{24 x^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 19, normalized size = 0.76 \begin {gather*} -\frac {6+\left (-17-e^2+e^x\right ) x}{x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 18, normalized size = 0.72 \begin {gather*} \frac {x e^{2} - x e^{x} + 17 \, x - 6}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 18, normalized size = 0.72 \begin {gather*} \frac {x e^{2} - x e^{x} + 17 \, x - 6}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 18, normalized size = 0.72
method | result | size |
norman | \(\frac {-6+\left ({\mathrm e}^{2}+17\right ) x -{\mathrm e}^{x} x}{x^{2}}\) | \(18\) |
risch | \(\frac {\left ({\mathrm e}^{2}+17\right ) x -6}{x^{2}}-\frac {{\mathrm e}^{x}}{x}\) | \(21\) |
default | \(-\frac {{\mathrm e}^{x}}{x}-\frac {6}{x^{2}}+\frac {17}{x}+\frac {{\mathrm e}^{2}}{x}\) | \(25\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.38, size = 26, normalized size = 1.04 \begin {gather*} \frac {e^{2}}{x} + \frac {17}{x} - \frac {6}{x^{2}} - {\rm Ei}\relax (x) + \Gamma \left (-1, -x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.08, size = 16, normalized size = 0.64 \begin {gather*} \frac {x\,\left ({\mathrm {e}}^2-{\mathrm {e}}^x+17\right )-6}{x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 19, normalized size = 0.76 \begin {gather*} - \frac {e^{x}}{x} - \frac {x \left (-17 - e^{2}\right ) + 6}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________