Optimal. Leaf size=33 \[ -e^3-e^x \left (-4+\log \left (e^x+\frac {2-x}{2 x}+2 x\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 3.45, antiderivative size = 25, normalized size of antiderivative = 0.76, number of steps used = 12, number of rules used = 4, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {6688, 6742, 2194, 2554} \begin {gather*} 4 e^x-e^x \log \left (2 x+e^x+\frac {1}{x}-\frac {1}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2194
Rule 2554
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^x \left (2+8 x+\left (-8+6 e^x\right ) x^2+16 x^3-x \left (2+\left (-1+2 e^x\right ) x+4 x^2\right ) \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )\right )}{x \left (2+\left (-1+2 e^x\right ) x+4 x^2\right )} \, dx\\ &=\int \left (3 e^x+\frac {e^x \left (2+2 x-5 x^2+4 x^3\right )}{x \left (2-x+2 e^x x+4 x^2\right )}-e^x \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )\right ) \, dx\\ &=3 \int e^x \, dx+\int \frac {e^x \left (2+2 x-5 x^2+4 x^3\right )}{x \left (2-x+2 e^x x+4 x^2\right )} \, dx-\int e^x \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right ) \, dx\\ &=3 e^x-e^x \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )+\int \frac {e^x \left (2+e^x-\frac {1}{x^2}\right )}{-\frac {1}{2}+e^x+\frac {1}{x}+2 x} \, dx+\int \left (\frac {2 e^x}{2-x+2 e^x x+4 x^2}+\frac {2 e^x}{x \left (2-x+2 e^x x+4 x^2\right )}-\frac {5 e^x x}{2-x+2 e^x x+4 x^2}+\frac {4 e^x x^2}{2-x+2 e^x x+4 x^2}\right ) \, dx\\ &=3 e^x-e^x \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )+2 \int \frac {e^x}{2-x+2 e^x x+4 x^2} \, dx+2 \int \frac {e^x}{x \left (2-x+2 e^x x+4 x^2\right )} \, dx+4 \int \frac {e^x x^2}{2-x+2 e^x x+4 x^2} \, dx-5 \int \frac {e^x x}{2-x+2 e^x x+4 x^2} \, dx+\int \left (e^x-\frac {e^x \left (2+2 x-5 x^2+4 x^3\right )}{x \left (2-x+2 e^x x+4 x^2\right )}\right ) \, dx\\ &=3 e^x-e^x \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )+2 \int \frac {e^x}{2-x+2 e^x x+4 x^2} \, dx+2 \int \frac {e^x}{x \left (2-x+2 e^x x+4 x^2\right )} \, dx+4 \int \frac {e^x x^2}{2-x+2 e^x x+4 x^2} \, dx-5 \int \frac {e^x x}{2-x+2 e^x x+4 x^2} \, dx+\int e^x \, dx-\int \frac {e^x \left (2+2 x-5 x^2+4 x^3\right )}{x \left (2-x+2 e^x x+4 x^2\right )} \, dx\\ &=4 e^x-e^x \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )+2 \int \frac {e^x}{2-x+2 e^x x+4 x^2} \, dx+2 \int \frac {e^x}{x \left (2-x+2 e^x x+4 x^2\right )} \, dx+4 \int \frac {e^x x^2}{2-x+2 e^x x+4 x^2} \, dx-5 \int \frac {e^x x}{2-x+2 e^x x+4 x^2} \, dx-\int \left (\frac {2 e^x}{2-x+2 e^x x+4 x^2}+\frac {2 e^x}{x \left (2-x+2 e^x x+4 x^2\right )}-\frac {5 e^x x}{2-x+2 e^x x+4 x^2}+\frac {4 e^x x^2}{2-x+2 e^x x+4 x^2}\right ) \, dx\\ &=4 e^x-e^x \log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 1.16, size = 21, normalized size = 0.64 \begin {gather*} -e^x \left (-4+\log \left (-\frac {1}{2}+e^x+\frac {1}{x}+2 x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 30, normalized size = 0.91 \begin {gather*} -e^{x} \log \left (\frac {4 \, x^{2} + 2 \, x e^{x} - x + 2}{2 \, x}\right ) + 4 \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 30, normalized size = 0.91 \begin {gather*} -e^{x} \log \left (\frac {4 \, x^{2} + 2 \, x e^{x} - x + 2}{2 \, x}\right ) + 4 \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.14, size = 193, normalized size = 5.85
method | result | size |
risch | \(-{\mathrm e}^{x} \ln \left (\frac {1}{2}+x^{2}+\left (\frac {{\mathrm e}^{x}}{2}-\frac {1}{4}\right ) x \right )+{\mathrm e}^{x} \ln \relax (x )+\frac {i \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (\frac {1}{2}+x^{2}+\left (\frac {{\mathrm e}^{x}}{2}-\frac {1}{4}\right ) x \right )\right ) \mathrm {csgn}\left (\frac {i \left (\frac {1}{2}+x^{2}+\left (\frac {{\mathrm e}^{x}}{2}-\frac {1}{4}\right ) x \right )}{x}\right ) {\mathrm e}^{x}}{2}-\frac {i \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (\frac {1}{2}+x^{2}+\left (\frac {{\mathrm e}^{x}}{2}-\frac {1}{4}\right ) x \right )}{x}\right )^{2} {\mathrm e}^{x}}{2}-\frac {i \pi \,\mathrm {csgn}\left (i \left (\frac {1}{2}+x^{2}+\left (\frac {{\mathrm e}^{x}}{2}-\frac {1}{4}\right ) x \right )\right ) \mathrm {csgn}\left (\frac {i \left (\frac {1}{2}+x^{2}+\left (\frac {{\mathrm e}^{x}}{2}-\frac {1}{4}\right ) x \right )}{x}\right )^{2} {\mathrm e}^{x}}{2}+\frac {i \pi \mathrm {csgn}\left (\frac {i \left (\frac {1}{2}+x^{2}+\left (\frac {{\mathrm e}^{x}}{2}-\frac {1}{4}\right ) x \right )}{x}\right )^{3} {\mathrm e}^{x}}{2}-{\mathrm e}^{x} \ln \relax (2)+4 \,{\mathrm e}^{x}\) | \(193\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.50, size = 30, normalized size = 0.91 \begin {gather*} {\left (\log \relax (2) + \log \relax (x) + 4\right )} e^{x} - e^{x} \log \left (4 \, x^{2} + 2 \, x e^{x} - x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.30, size = 25, normalized size = 0.76 \begin {gather*} -{\mathrm {e}}^x\,\left (\ln \left (\frac {x\,{\mathrm {e}}^x-\frac {x}{2}+2\,x^2+1}{x}\right )-4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________