Optimal. Leaf size=27 \[ -3+e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x} \]
________________________________________________________________________________________
Rubi [A] time = 1.10, antiderivative size = 26, normalized size of antiderivative = 0.96, number of steps used = 14, number of rules used = 4, integrand size = 87, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.046, Rules used = {6742, 2194, 14, 2551} \begin {gather*} 2 x+e^x+\frac {17}{x}+\frac {\log \left (x-2 e^{-2 x}\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2194
Rule 2551
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (e^x+\frac {2 (1+2 x)}{x^2 \left (-2+e^{2 x} x\right )}+\frac {-16+2 x^2-\log \left (-2 e^{-2 x}+x\right )}{x^2}\right ) \, dx\\ &=2 \int \frac {1+2 x}{x^2 \left (-2+e^{2 x} x\right )} \, dx+\int e^x \, dx+\int \frac {-16+2 x^2-\log \left (-2 e^{-2 x}+x\right )}{x^2} \, dx\\ &=e^x+2 \int \left (\frac {1}{x^2 \left (-2+e^{2 x} x\right )}+\frac {2}{x \left (-2+e^{2 x} x\right )}\right ) \, dx+\int \left (\frac {2 \left (-8+x^2\right )}{x^2}-\frac {\log \left (-2 e^{-2 x}+x\right )}{x^2}\right ) \, dx\\ &=e^x+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx+2 \int \frac {-8+x^2}{x^2} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx-\int \frac {\log \left (-2 e^{-2 x}+x\right )}{x^2} \, dx\\ &=e^x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \left (1-\frac {8}{x^2}\right ) \, dx+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx-\int \frac {-4-e^{2 x}}{x \left (2-e^{2 x} x\right )} \, dx\\ &=e^x+\frac {16}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx-\int \left (\frac {1}{x^2}+\frac {2 (1+2 x)}{x^2 \left (-2+e^{2 x} x\right )}\right ) \, dx\\ &=e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx-2 \int \frac {1+2 x}{x^2 \left (-2+e^{2 x} x\right )} \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx\\ &=e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}+2 \int \frac {1}{x^2 \left (-2+e^{2 x} x\right )} \, dx-2 \int \left (\frac {1}{x^2 \left (-2+e^{2 x} x\right )}+\frac {2}{x \left (-2+e^{2 x} x\right )}\right ) \, dx+4 \int \frac {1}{x \left (-2+e^{2 x} x\right )} \, dx\\ &=e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.29, size = 26, normalized size = 0.96 \begin {gather*} e^x+\frac {17}{x}+2 x+\frac {\log \left (-2 e^{-2 x}+x\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 29, normalized size = 1.07 \begin {gather*} \frac {2 \, x^{2} + x e^{x} + \log \left ({\left (x e^{\left (2 \, x\right )} - 2\right )} e^{\left (-2 \, x\right )}\right ) + 17}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.31, size = 24, normalized size = 0.89 \begin {gather*} \frac {2 \, x^{2} + x e^{x} + \log \left (x e^{\left (2 \, x\right )} - 2\right ) + 17}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.16, size = 218, normalized size = 8.07
method | result | size |
risch | \(-\frac {2 \ln \left ({\mathrm e}^{x}\right )}{x}+\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{x}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )-2 i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )^{2}+i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )^{3}-i \pi \,\mathrm {csgn}\left (i \left (x \,{\mathrm e}^{2 x}-2\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )+i \pi \,\mathrm {csgn}\left (i \left (x \,{\mathrm e}^{2 x}-2\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )^{2}+i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )^{2}-i \pi \mathrm {csgn}\left (i {\mathrm e}^{-2 x} \left (x \,{\mathrm e}^{2 x}-2\right )\right )^{3}+4 x^{2}+2 \,{\mathrm e}^{x} x +2 \ln \left (x \,{\mathrm e}^{2 x}-2\right )+34}{2 x}\) | \(218\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 24, normalized size = 0.89 \begin {gather*} \frac {2 \, x^{2} + x e^{x} + \log \left (x e^{\left (2 \, x\right )} - 2\right ) + 17}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.50, size = 24, normalized size = 0.89 \begin {gather*} 2\,x+{\mathrm {e}}^x+\frac {\ln \left (x-2\,{\mathrm {e}}^{-2\,x}\right )}{x}+\frac {17}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.41, size = 26, normalized size = 0.96 \begin {gather*} 2 x + e^{x} + \frac {\log {\left (\left (x e^{2 x} - 2\right ) e^{- 2 x} \right )}}{x} + \frac {17}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________