Optimal. Leaf size=33 \[ 2+\left (-4+4 e^{-\frac {-e+\frac {x}{2}}{x}} \left (e^{1-x}+x\right )\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 3.91, antiderivative size = 89, normalized size of antiderivative = 2.70, number of steps used = 10, number of rules used = 6, integrand size = 117, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {6688, 12, 6742, 6686, 6706, 2288} \begin {gather*} \frac {32 e^{\frac {2 e}{x}-x} \left (x^2+2 e\right )}{\left (\frac {2 e}{x^2}+1\right ) x}+\frac {16 \left (\sqrt {e}-e^{e/x} x\right )^2}{e}+16 e^{-2 x+\frac {2 e}{x}+1}-32 e^{-x+\frac {e}{x}+\frac {1}{2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2288
Rule 6686
Rule 6688
Rule 6706
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {32 e^{-1+\frac {e}{x}-2 x} \left (e^{1+\frac {e}{x}}-e^{\frac {1}{2}+x}+e^{\frac {e}{x}+x} x\right ) \left (-e^2-e^{1+x} x-e x^2+e^x x^2\right )}{x^2} \, dx\\ &=32 \int \frac {e^{-1+\frac {e}{x}-2 x} \left (e^{1+\frac {e}{x}}-e^{\frac {1}{2}+x}+e^{\frac {e}{x}+x} x\right ) \left (-e^2-e^{1+x} x-e x^2+e^x x^2\right )}{x^2} \, dx\\ &=32 \int \left (\frac {e^{-1+\frac {e}{x}} (e-x) \left (\sqrt {e}-e^{e/x} x\right )}{x}-\frac {e^{1+\frac {2 e}{x}-2 x} \left (e+x^2\right )}{x^2}-\frac {e^{\frac {e}{x}-x} \left (-e^{3/2}+2 e^{1+\frac {e}{x}} x-\sqrt {e} x^2-e^{e/x} x^2+e^{e/x} x^3\right )}{x^2}\right ) \, dx\\ &=32 \int \frac {e^{-1+\frac {e}{x}} (e-x) \left (\sqrt {e}-e^{e/x} x\right )}{x} \, dx-32 \int \frac {e^{1+\frac {2 e}{x}-2 x} \left (e+x^2\right )}{x^2} \, dx-32 \int \frac {e^{\frac {e}{x}-x} \left (-e^{3/2}+2 e^{1+\frac {e}{x}} x-\sqrt {e} x^2-e^{e/x} x^2+e^{e/x} x^3\right )}{x^2} \, dx\\ &=16 e^{1+\frac {2 e}{x}-2 x}+\frac {16 \left (\sqrt {e}-e^{e/x} x\right )^2}{e}-32 \int \left (-\frac {e^{\frac {1}{2}+\frac {e}{x}-x} \left (e+x^2\right )}{x^2}+\frac {e^{\frac {2 e}{x}-x} \left (2 e-x+x^2\right )}{x}\right ) \, dx\\ &=16 e^{1+\frac {2 e}{x}-2 x}+\frac {16 \left (\sqrt {e}-e^{e/x} x\right )^2}{e}+32 \int \frac {e^{\frac {1}{2}+\frac {e}{x}-x} \left (e+x^2\right )}{x^2} \, dx-32 \int \frac {e^{\frac {2 e}{x}-x} \left (2 e-x+x^2\right )}{x} \, dx\\ &=16 e^{1+\frac {2 e}{x}-2 x}-32 e^{\frac {1}{2}+\frac {e}{x}-x}+\frac {16 \left (\sqrt {e}-e^{e/x} x\right )^2}{e}+\frac {32 e^{\frac {2 e}{x}-x} \left (2 e+x^2\right )}{\left (1+\frac {2 e}{x^2}\right ) x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 2.26, size = 81, normalized size = 2.45 \begin {gather*} -32 e^{e/x} \left (\frac {1}{\sqrt {e}}-e^{\frac {e}{x}-x}\right ) x-32 \left (-\frac {1}{2} e^{1+\frac {2 e}{x}-2 x}+e^{\frac {1}{2}+\frac {e}{x}-x}-\frac {1}{2} e^{-1+\frac {2 e}{x}} x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.80, size = 63, normalized size = 1.91 \begin {gather*} 16 \, {\left (x^{2} + 2 \, {\left (x - e^{\left (\frac {x - 2 \, e}{2 \, x}\right )}\right )} e^{\left (-x + 1\right )} - 2 \, x e^{\left (\frac {x - 2 \, e}{2 \, x}\right )} + e^{\left (-2 \, x + 2\right )}\right )} e^{\left (-\frac {x - 2 \, e}{x}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.59, size = 131, normalized size = 3.97 \begin {gather*} 16 \, x^{2} e^{\left (\frac {2 \, e}{x} - 1\right )} + 16 \, {\left (2 \, x e^{\left (-\frac {2 \, x^{2} - x - 2 \, e}{2 \, x} - \frac {x^{2} - 2 \, e}{x}\right )} - 2 \, x e^{\left (-\frac {x^{2} - 2 \, e}{x}\right )} - 2 \, e^{\left (-\frac {2 \, x^{2} - x - 2 \, e}{x}\right )} + e^{\left (-\frac {3 \, {\left (2 \, x^{2} - x - 2 \, e\right )}}{2 \, x}\right )}\right )} e^{\left (\frac {2 \, x^{2} - x - 2 \, e}{2 \, x}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.10, size = 66, normalized size = 2.00
method | result | size |
risch | \(\left (-32 x -32 \,{\mathrm e}^{1-x}\right ) {\mathrm e}^{\frac {2 \,{\mathrm e}-x}{2 x}}+\left (16 x^{2}+32 x \,{\mathrm e}^{1-x}+16 \,{\mathrm e}^{-2 x +2}\right ) {\mathrm e}^{\frac {2 \,{\mathrm e}-x}{x}}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.50, size = 87, normalized size = 2.64 \begin {gather*} -32 \, {\rm Ei}\left (\frac {e}{x}\right ) e^{\frac {1}{2}} + 16 \, {\left ({\left (2 \, x e^{x} + e\right )} e^{\left (\frac {2 \, e}{x}\right )} - 2 \, e^{\left (x + \frac {e}{x} + \frac {1}{2}\right )}\right )} e^{\left (-2 \, x\right )} + 32 \, e^{\frac {1}{2}} \Gamma \left (-1, -\frac {e}{x}\right ) + 64 \, e \Gamma \left (-1, -\frac {2 \, e}{x}\right ) + 128 \, e \Gamma \left (-2, -\frac {2 \, e}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int -\frac {{\mathrm {e}}^{-\frac {2\,\left (\frac {x}{2}-\mathrm {e}\right )}{x}}\,\left ({\mathrm {e}}^{2-2\,x}\,\left (32\,x^2+32\,\mathrm {e}\right )+{\mathrm {e}}^{1-x}\,\left (64\,x\,\mathrm {e}-{\mathrm {e}}^{\frac {\frac {x}{2}-\mathrm {e}}{x}}\,\left (32\,x^2+32\,\mathrm {e}\right )-32\,x^2+32\,x^3\right )+32\,x^2\,\mathrm {e}-{\mathrm {e}}^{\frac {\frac {x}{2}-\mathrm {e}}{x}}\,\left (32\,x\,\mathrm {e}-32\,x^2\right )-32\,x^3\right )}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 82.39, size = 76, normalized size = 2.30 \begin {gather*} 16 x^{2} e^{- \frac {2 \left (\frac {x}{2} - e\right )}{x}} - 32 x e^{- \frac {\frac {x}{2} - e}{x}} + \left (32 x e^{- \frac {2 \left (\frac {x}{2} - e\right )}{x}} - 32 e^{- \frac {\frac {x}{2} - e}{x}}\right ) e^{1 - x} + 16 e^{- \frac {2 \left (\frac {x}{2} - e\right )}{x}} e^{2 - 2 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________