Optimal. Leaf size=34 \[ \frac {1}{e^3}+\frac {1}{2} \left (e^x-\left (7-e^x \left (-1+\frac {4}{x}-x\right )\right )^2+x\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.33, antiderivative size = 76, normalized size of antiderivative = 2.24, number of steps used = 25, number of rules used = 7, integrand size = 65, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {12, 14, 2199, 2194, 2177, 2178, 2176} \begin {gather*} -\frac {1}{2} e^{2 x} x^2-\frac {8 e^{2 x}}{x^2}-7 e^x x-e^{2 x} x+\frac {x}{2}-\frac {13 e^x}{2}+\frac {7 e^{2 x}}{2}+\frac {28 e^x}{x}+\frac {4 e^{2 x}}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \frac {x^3+e^x \left (-56 x+56 x^2-27 x^3-14 x^4\right )+e^{2 x} \left (32-40 x+16 x^2+12 x^3-6 x^4-2 x^5\right )}{x^3} \, dx\\ &=\frac {1}{2} \int \left (1-\frac {2 e^{2 x} \left (-4+x+x^2\right ) \left (4-4 x+2 x^2+x^3\right )}{x^3}-\frac {e^x \left (56-56 x+27 x^2+14 x^3\right )}{x^2}\right ) \, dx\\ &=\frac {x}{2}-\frac {1}{2} \int \frac {e^x \left (56-56 x+27 x^2+14 x^3\right )}{x^2} \, dx-\int \frac {e^{2 x} \left (-4+x+x^2\right ) \left (4-4 x+2 x^2+x^3\right )}{x^3} \, dx\\ &=\frac {x}{2}-\frac {1}{2} \int \left (27 e^x+\frac {56 e^x}{x^2}-\frac {56 e^x}{x}+14 e^x x\right ) \, dx-\int \left (-6 e^{2 x}-\frac {16 e^{2 x}}{x^3}+\frac {20 e^{2 x}}{x^2}-\frac {8 e^{2 x}}{x}+3 e^{2 x} x+e^{2 x} x^2\right ) \, dx\\ &=\frac {x}{2}-3 \int e^{2 x} x \, dx+6 \int e^{2 x} \, dx-7 \int e^x x \, dx+8 \int \frac {e^{2 x}}{x} \, dx-\frac {27 \int e^x \, dx}{2}+16 \int \frac {e^{2 x}}{x^3} \, dx-20 \int \frac {e^{2 x}}{x^2} \, dx-28 \int \frac {e^x}{x^2} \, dx+28 \int \frac {e^x}{x} \, dx-\int e^{2 x} x^2 \, dx\\ &=-\frac {27 e^x}{2}+3 e^{2 x}-\frac {8 e^{2 x}}{x^2}+\frac {28 e^x}{x}+\frac {20 e^{2 x}}{x}+\frac {x}{2}-7 e^x x-\frac {3}{2} e^{2 x} x-\frac {1}{2} e^{2 x} x^2+28 \text {Ei}(x)+8 \text {Ei}(2 x)+\frac {3}{2} \int e^{2 x} \, dx+7 \int e^x \, dx+16 \int \frac {e^{2 x}}{x^2} \, dx-28 \int \frac {e^x}{x} \, dx-40 \int \frac {e^{2 x}}{x} \, dx+\int e^{2 x} x \, dx\\ &=-\frac {13 e^x}{2}+\frac {15 e^{2 x}}{4}-\frac {8 e^{2 x}}{x^2}+\frac {28 e^x}{x}+\frac {4 e^{2 x}}{x}+\frac {x}{2}-7 e^x x-e^{2 x} x-\frac {1}{2} e^{2 x} x^2-32 \text {Ei}(2 x)-\frac {1}{2} \int e^{2 x} \, dx+32 \int \frac {e^{2 x}}{x} \, dx\\ &=-\frac {13 e^x}{2}+\frac {7 e^{2 x}}{2}-\frac {8 e^{2 x}}{x^2}+\frac {28 e^x}{x}+\frac {4 e^{2 x}}{x}+\frac {x}{2}-7 e^x x-e^{2 x} x-\frac {1}{2} e^{2 x} x^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 42, normalized size = 1.24 \begin {gather*} \frac {x^3-e^{2 x} \left (-4+x+x^2\right )^2-e^x x \left (-56+13 x+14 x^2\right )}{2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.73, size = 51, normalized size = 1.50 \begin {gather*} \frac {x^{3} - {\left (x^{4} + 2 \, x^{3} - 7 \, x^{2} - 8 \, x + 16\right )} e^{\left (2 \, x\right )} - {\left (14 \, x^{3} + 13 \, x^{2} - 56 \, x\right )} e^{x}}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.44, size = 69, normalized size = 2.03 \begin {gather*} -\frac {x^{4} e^{\left (2 \, x\right )} + 2 \, x^{3} e^{\left (2 \, x\right )} + 14 \, x^{3} e^{x} - x^{3} - 7 \, x^{2} e^{\left (2 \, x\right )} + 13 \, x^{2} e^{x} - 8 \, x e^{\left (2 \, x\right )} - 56 \, x e^{x} + 16 \, e^{\left (2 \, x\right )}}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 49, normalized size = 1.44
method | result | size |
risch | \(\frac {x}{2}-\frac {\left (x^{4}+2 x^{3}-7 x^{2}-8 x +16\right ) {\mathrm e}^{2 x}}{2 x^{2}}-\frac {\left (14 x^{2}+13 x -56\right ) {\mathrm e}^{x}}{2 x}\) | \(49\) |
default | \(\frac {x}{2}+\frac {7 \,{\mathrm e}^{2 x}}{2}-\frac {8 \,{\mathrm e}^{2 x}}{x^{2}}+\frac {4 \,{\mathrm e}^{2 x}}{x}-x \,{\mathrm e}^{2 x}+\frac {28 \,{\mathrm e}^{x}}{x}-7 \,{\mathrm e}^{x} x -\frac {13 \,{\mathrm e}^{x}}{2}-\frac {{\mathrm e}^{2 x} x^{2}}{2}\) | \(61\) |
norman | \(\frac {\frac {x^{3}}{2}-8 \,{\mathrm e}^{2 x}+4 x \,{\mathrm e}^{2 x}+28 \,{\mathrm e}^{x} x -\frac {13 \,{\mathrm e}^{x} x^{2}}{2}-7 \,{\mathrm e}^{x} x^{3}+\frac {7 \,{\mathrm e}^{2 x} x^{2}}{2}-{\mathrm e}^{2 x} x^{3}-\frac {{\mathrm e}^{2 x} x^{4}}{2}}{x^{2}}\) | \(70\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.54, size = 79, normalized size = 2.32 \begin {gather*} -\frac {1}{4} \, {\left (2 \, x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} - \frac {3}{4} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} - 7 \, {\left (x - 1\right )} e^{x} + \frac {1}{2} \, x + 8 \, {\rm Ei}\left (2 \, x\right ) + 28 \, {\rm Ei}\relax (x) + 3 \, e^{\left (2 \, x\right )} - \frac {27}{2} \, e^{x} - 28 \, \Gamma \left (-1, -x\right ) - 40 \, \Gamma \left (-1, -2 \, x\right ) - 64 \, \Gamma \left (-2, -2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.38, size = 59, normalized size = 1.74 \begin {gather*} \frac {7\,{\mathrm {e}}^{2\,x}}{2}-\frac {13\,{\mathrm {e}}^x}{2}-\frac {8\,{\mathrm {e}}^{2\,x}-x\,\left (4\,{\mathrm {e}}^{2\,x}+28\,{\mathrm {e}}^x\right )}{x^2}-\frac {x^2\,{\mathrm {e}}^{2\,x}}{2}-x\,\left ({\mathrm {e}}^{2\,x}+7\,{\mathrm {e}}^x-\frac {1}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 54, normalized size = 1.59 \begin {gather*} \frac {x}{2} + \frac {\left (- 28 x^{4} - 26 x^{3} + 112 x^{2}\right ) e^{x} + \left (- 2 x^{5} - 4 x^{4} + 14 x^{3} + 16 x^{2} - 32 x\right ) e^{2 x}}{4 x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________