Optimal. Leaf size=31 \[ \frac {2 \log \left (\frac {e^{-x} \left (\frac {e^x}{2}-x\right )}{-x+\log (16)}\right )}{x} \]
________________________________________________________________________________________
Rubi [B] time = 2.70, antiderivative size = 75, normalized size of antiderivative = 2.42, number of steps used = 20, number of rules used = 9, integrand size = 104, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {6741, 6742, 6688, 14, 36, 29, 31, 2551, 12} \begin {gather*} -\frac {4 \log (x)}{\log (256)}+\frac {2 \log (x)}{\log (16)}-\frac {2 \log (x-\log (16))}{\log (16)}+\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}+\frac {4 \log (2 x-\log (256))}{\log (256)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 29
Rule 31
Rule 36
Rule 2551
Rule 6688
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-2 e^x x+4 x^3-\left (-4 x+4 x^2\right ) \log (16)-\left (-4 x^2+e^x (2 x-2 \log (16))+4 x \log (16)\right ) \log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+2 \log (16)}\right )}{\left (e^x-2 x\right ) x^2 (x-\log (16))} \, dx\\ &=\int \left (\frac {4 (-1+x)}{\left (e^x-2 x\right ) x}-\frac {2 \left (x+x \log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+\log (256)}\right )-\log (16) \log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+\log (256)}\right )\right )}{x^2 (x-\log (16))}\right ) \, dx\\ &=-\left (2 \int \frac {x+x \log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+\log (256)}\right )-\log (16) \log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+\log (256)}\right )}{x^2 (x-\log (16))} \, dx\right )+4 \int \frac {-1+x}{\left (e^x-2 x\right ) x} \, dx\\ &=-\left (2 \int \frac {\frac {x}{x-\log (16)}+\log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+\log (256)}\right )}{x^2} \, dx\right )+4 \int \left (\frac {1}{e^x-2 x}-\frac {1}{\left (e^x-2 x\right ) x}\right ) \, dx\\ &=-\left (2 \int \left (\frac {1}{x (x-\log (16))}+\frac {\log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+\log (256)}\right )}{x^2}\right ) \, dx\right )+4 \int \frac {1}{e^x-2 x} \, dx-4 \int \frac {1}{\left (e^x-2 x\right ) x} \, dx\\ &=-\left (2 \int \frac {1}{x (x-\log (16))} \, dx\right )-2 \int \frac {\log \left (\frac {e^{-x} \left (e^x-2 x\right )}{-2 x+\log (256)}\right )}{x^2} \, dx+4 \int \frac {1}{e^x-2 x} \, dx-4 \int \frac {1}{\left (e^x-2 x\right ) x} \, dx\\ &=\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}-2 \int \frac {2 \left (-e^x+2 x^2+\log (256)-x \log (256)\right )}{\left (e^x-2 x\right ) x (2 x-\log (256))} \, dx+4 \int \frac {1}{e^x-2 x} \, dx-4 \int \frac {1}{\left (e^x-2 x\right ) x} \, dx+\frac {2 \int \frac {1}{x} \, dx}{\log (16)}-\frac {2 \int \frac {1}{x-\log (16)} \, dx}{\log (16)}\\ &=\frac {2 \log (x)}{\log (16)}-\frac {2 \log (x-\log (16))}{\log (16)}+\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}+4 \int \frac {1}{e^x-2 x} \, dx-4 \int \frac {1}{\left (e^x-2 x\right ) x} \, dx-4 \int \frac {-e^x+2 x^2+\log (256)-x \log (256)}{\left (e^x-2 x\right ) x (2 x-\log (256))} \, dx\\ &=\frac {2 \log (x)}{\log (16)}-\frac {2 \log (x-\log (16))}{\log (16)}+\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}+4 \int \frac {1}{e^x-2 x} \, dx-4 \int \frac {1}{\left (e^x-2 x\right ) x} \, dx-4 \int \left (\frac {-1+x}{\left (e^x-2 x\right ) x}-\frac {1}{x (2 x-\log (256))}\right ) \, dx\\ &=\frac {2 \log (x)}{\log (16)}-\frac {2 \log (x-\log (16))}{\log (16)}+\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}+4 \int \frac {1}{e^x-2 x} \, dx-4 \int \frac {1}{\left (e^x-2 x\right ) x} \, dx-4 \int \frac {-1+x}{\left (e^x-2 x\right ) x} \, dx+4 \int \frac {1}{x (2 x-\log (256))} \, dx\\ &=\frac {2 \log (x)}{\log (16)}-\frac {2 \log (x-\log (16))}{\log (16)}+\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}-4 \int \left (\frac {1}{e^x-2 x}-\frac {1}{\left (e^x-2 x\right ) x}\right ) \, dx+4 \int \frac {1}{e^x-2 x} \, dx-4 \int \frac {1}{\left (e^x-2 x\right ) x} \, dx-\frac {4 \int \frac {1}{x} \, dx}{\log (256)}+\frac {8 \int \frac {1}{2 x-\log (256)} \, dx}{\log (256)}\\ &=\frac {2 \log (x)}{\log (16)}-\frac {4 \log (x)}{\log (256)}-\frac {2 \log (x-\log (16))}{\log (16)}+\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}+\frac {4 \log (2 x-\log (256))}{\log (256)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.36, size = 75, normalized size = 2.42 \begin {gather*} \frac {2 \log (x)}{\log (16)}-\frac {4 \log (x)}{\log (256)}-\frac {2 \log (x-\log (16))}{\log (16)}+\frac {2 \log \left (-\frac {e^{-x} \left (e^x-2 x\right )}{2 x-\log (256)}\right )}{x}+\frac {4 \log (2 x-\log (256))}{\log (256)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.60, size = 28, normalized size = 0.90 \begin {gather*} \frac {2 \, \log \left (\frac {{\left (2 \, x - e^{x}\right )} e^{\left (-x\right )}}{2 \, {\left (x - 4 \, \log \relax (2)\right )}}\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.43, size = 31, normalized size = 1.00 \begin {gather*} -\frac {2 \, {\left (\log \relax (2) - \log \left ({\left (2 \, x - e^{x}\right )} e^{\left (-x\right )}\right ) + \log \left (x - 4 \, \log \relax (2)\right )\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.50, size = 28, normalized size = 0.90
method | result | size |
norman | \(\frac {2 \ln \left (\frac {\left ({\mathrm e}^{x}-2 x \right ) {\mathrm e}^{-x}}{8 \ln \relax (2)-2 x}\right )}{x}\) | \(28\) |
risch | \(-\frac {2 \ln \left ({\mathrm e}^{x}\right )}{x}-\frac {-i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )^{2}-i \pi \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )^{3}-i \pi \,\mathrm {csgn}\left (\frac {i}{\ln \relax (2)-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )^{2}+2 i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )^{2}+i \pi \,\mathrm {csgn}\left (i \left (\frac {{\mathrm e}^{x}}{2}-x \right )\right ) \mathrm {csgn}\left (\frac {i}{\ln \relax (2)-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )+i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )^{3}+i \pi \,\mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )^{2}+i \pi \,\mathrm {csgn}\left (i \left (\frac {{\mathrm e}^{x}}{2}-x \right )\right ) \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )^{2}-2 i \pi +i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \relax (2)-\frac {x}{4}}\right )+4 \ln \relax (2)+2 \ln \left (\ln \relax (2)-\frac {x}{4}\right )-2 \ln \left (x -\frac {{\mathrm e}^{x}}{2}\right )}{x}\) | \(396\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.61, size = 26, normalized size = 0.84 \begin {gather*} -\frac {2 \, {\left (\log \relax (2) - \log \left (2 \, x - e^{x}\right ) + \log \left (x - 4 \, \log \relax (2)\right )\right )}}{x} \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 {4\,\ln \relax (2)\,\left (4\,x-4\,x^2\right )-\ln \left (\frac {{\mathrm {e}}^{-x}\,\left (2\,x-{\mathrm {e}}^x\right )}{2\,x-8\,\ln \relax (2)}\right )\,\left ({\mathrm {e}}^x\,\left (2\,x-8\,\ln \relax (2)\right )+16\,x\,\ln \relax (2)-4\,x^2\right )-2\,x\,{\mathrm {e}}^x+4\,x^3}{{\mathrm {e}}^x\,\left (4\,x^2\,\ln \relax (2)-x^3\right )-8\,x^3\,\ln \relax (2)+2\,x^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.52, size = 22, normalized size = 0.71 \begin {gather*} \frac {2 \log {\left (\frac {\left (- 2 x + e^{x}\right ) e^{- x}}{- 2 x + 8 \log {\relax (2 )}} \right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________