Optimal. Leaf size=24 \[ -e^x x+4 \left (4+2 e^x-\frac {1}{x}+x+\log (2)\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 21, normalized size of antiderivative = 0.88, 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 = {14, 2176, 2194} \begin {gather*} e^x (7-x)+e^x+4 x-\frac {4}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2176
Rule 2194
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-e^x (-7+x)+\frac {4 \left (1+x^2\right )}{x^2}\right ) \, dx\\ &=4 \int \frac {1+x^2}{x^2} \, dx-\int e^x (-7+x) \, dx\\ &=e^x (7-x)+4 \int \left (1+\frac {1}{x^2}\right ) \, dx+\int e^x \, dx\\ &=e^x+e^x (7-x)-\frac {4}{x}+4 x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 17, normalized size = 0.71 \begin {gather*} -e^x (-8+x)-\frac {4}{x}+4 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.75, size = 22, normalized size = 0.92 \begin {gather*} \frac {4 \, x^{2} - {\left (x^{2} - 8 \, x\right )} e^{x} - 4}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 23, normalized size = 0.96 \begin {gather*} -\frac {x^{2} e^{x} - 4 \, x^{2} - 8 \, x e^{x} + 4}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 18, normalized size = 0.75
method | result | size |
risch | \(4 x -\frac {4}{x}+\left (8-x \right ) {\mathrm e}^{x}\) | \(18\) |
default | \(4 x -\frac {4}{x}-{\mathrm e}^{x} x +8 \,{\mathrm e}^{x}\) | \(19\) |
norman | \(\frac {-4+4 x^{2}+8 \,{\mathrm e}^{x} x -{\mathrm e}^{x} x^{2}}{x}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.46, size = 20, normalized size = 0.83 \begin {gather*} -{\left (x - 1\right )} e^{x} + 4 \, x - \frac {4}{x} + 7 \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.09, size = 17, normalized size = 0.71 \begin {gather*} 8\,{\mathrm {e}}^x-x\,\left ({\mathrm {e}}^x-4\right )-\frac {4}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.10, size = 12, normalized size = 0.50 \begin {gather*} 4 x + \left (8 - x\right ) e^{x} - \frac {4}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________