Optimal. Leaf size=26 \[ \frac {e^4+x+\log \left (2 e^{-4 e^x+2 x} x^4\right )}{x^2} \]
________________________________________________________________________________________
Rubi [B] time = 0.15, antiderivative size = 65, normalized size of antiderivative = 2.50, number of steps used = 14, number of rules used = 6, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.162, Rules used = {14, 2177, 2178, 37, 2551, 12} \begin {gather*} \frac {(x+2)^2}{2 x^2}-\frac {\left (x+2 \left (2-e^4\right )\right )^2}{4 \left (2-e^4\right ) x^2}+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 37
Rule 2177
Rule 2178
Rule 2551
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {4 e^x}{x^2}+\frac {4 \left (1-\frac {e^4}{2}\right )+x-2 \log \left (2 e^{-4 e^x+2 x} x^4\right )}{x^3}\right ) \, dx\\ &=-\left (4 \int \frac {e^x}{x^2} \, dx\right )+\int \frac {4 \left (1-\frac {e^4}{2}\right )+x-2 \log \left (2 e^{-4 e^x+2 x} x^4\right )}{x^3} \, dx\\ &=\frac {4 e^x}{x}-4 \int \frac {e^x}{x} \, dx+\int \left (\frac {4-2 e^4+x}{x^3}-\frac {2 \log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^3}\right ) \, dx\\ &=\frac {4 e^x}{x}-4 \text {Ei}(x)-2 \int \frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^3} \, dx+\int \frac {4-2 e^4+x}{x^3} \, dx\\ &=\frac {4 e^x}{x}-\frac {\left (2 \left (2-e^4\right )+x\right )^2}{4 \left (2-e^4\right ) x^2}-4 \text {Ei}(x)+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2}-\int \frac {2 \left (2+x-2 e^x x\right )}{x^3} \, dx\\ &=\frac {4 e^x}{x}-\frac {\left (2 \left (2-e^4\right )+x\right )^2}{4 \left (2-e^4\right ) x^2}-4 \text {Ei}(x)+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2}-2 \int \frac {2+x-2 e^x x}{x^3} \, dx\\ &=\frac {4 e^x}{x}-\frac {\left (2 \left (2-e^4\right )+x\right )^2}{4 \left (2-e^4\right ) x^2}-4 \text {Ei}(x)+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2}-2 \int \left (-\frac {2 e^x}{x^2}+\frac {2+x}{x^3}\right ) \, dx\\ &=\frac {4 e^x}{x}-\frac {\left (2 \left (2-e^4\right )+x\right )^2}{4 \left (2-e^4\right ) x^2}-4 \text {Ei}(x)+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2}-2 \int \frac {2+x}{x^3} \, dx+4 \int \frac {e^x}{x^2} \, dx\\ &=\frac {(2+x)^2}{2 x^2}-\frac {\left (2 \left (2-e^4\right )+x\right )^2}{4 \left (2-e^4\right ) x^2}-4 \text {Ei}(x)+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2}+4 \int \frac {e^x}{x} \, dx\\ &=\frac {(2+x)^2}{2 x^2}-\frac {\left (2 \left (2-e^4\right )+x\right )^2}{4 \left (2-e^4\right ) x^2}+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 34, normalized size = 1.31 \begin {gather*} \frac {e^4}{x^2}+\frac {1}{x}+\frac {\log \left (2 e^{-2 \left (2 e^x-x\right )} x^4\right )}{x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.00, size = 23, normalized size = 0.88 \begin {gather*} \frac {x + e^{4} + \log \left (2 \, x^{4} e^{\left (2 \, x - 4 \, e^{x}\right )}\right )}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 20, normalized size = 0.77 \begin {gather*} \frac {3 \, x + e^{4} - 4 \, e^{x} + \log \left (2 \, x^{4}\right )}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 42, normalized size = 1.62
method | result | size |
default | \(\frac {\ln \left (2 x^{4} {\mathrm e}^{2 x} {\mathrm e}^{-4 \,{\mathrm e}^{x}}\right )}{x^{2}}+\frac {1}{x}+\frac {2}{x^{2}}+\frac {2 \,{\mathrm e}^{4}-4}{2 x^{2}}\) | \(42\) |
risch | \(-\frac {\ln \left ({\mathrm e}^{4 \,{\mathrm e}^{x}}\right )}{x^{2}}+\frac {2 x +2 \,{\mathrm e}^{4}+2 \ln \relax (2)+8 \ln \relax (x )+i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right ) \mathrm {csgn}\left (i x^{4} {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )^{2}-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}^{-4 \,{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )^{2}+i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )^{2}+i \pi \,\mathrm {csgn}\left (i x^{4}\right ) \mathrm {csgn}\left (i x^{4} {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{3}\right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{4}\right )^{2}+i \pi \,\mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (i x^{3}\right )^{2}+i \pi \,\mathrm {csgn}\left (i x^{3}\right ) \mathrm {csgn}\left (i x^{4}\right )^{2}-i \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )+2 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}+4 \ln \left ({\mathrm e}^{x}\right )-i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )^{3}-i \pi \mathrm {csgn}\left (i x^{3}\right )^{3}-i \pi \mathrm {csgn}\left (i x^{4}\right )^{3}-i \pi \mathrm {csgn}\left (i x^{2}\right )^{3}-i \pi \mathrm {csgn}\left (i {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )^{3}-i \pi \mathrm {csgn}\left (i x^{4} {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )^{3}-i \pi \,\mathrm {csgn}\left (i x^{4}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right ) \mathrm {csgn}\left (i x^{4} {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )-i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-4 \,{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-4 \,{\mathrm e}^{x}+2 x}\right )-i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{3}\right ) \mathrm {csgn}\left (i x^{4}\right )-i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (i x^{3}\right )}{2 x^{2}}\) | \(524\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {4 \, x + \log \relax (2) + 4 \, \log \relax (x) + 2}{x^{2}} - \frac {1}{x} + \frac {e^{4}}{x^{2}} - \frac {2}{x^{2}} - 4 \, \Gamma \left (-1, -x\right ) + 8 \, \int \frac {e^{x}}{x^{3}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.30, size = 20, normalized size = 0.77 \begin {gather*} \frac {3\,x+{\mathrm {e}}^4+\ln \left (2\,x^4\right )-4\,{\mathrm {e}}^x}{x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.34, size = 31, normalized size = 1.19 \begin {gather*} - \frac {- x - e^{4}}{x^{2}} + \frac {\log {\left (2 x^{4} e^{2 x} e^{- 4 e^{x}} \right )}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________