Optimal. Leaf size=31 \[ \frac {2 \log \left (\frac {e^{-x} \left (\frac {e^x}{2}-x\right )}{-x+\log (16)}\right )}{x} \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(75\) vs. \(2(31)=62\).
time = 1.66, 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 = {6873, 6874,
6820, 14, 36, 29, 31, 2631, 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 2631
Rule 6820
Rule 6873
Rule 6874
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 [F]
time = 0.21, size = 0, normalized size = 0.00 \begin {gather*} \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 )}{2 x^4-2 x^3 \log (16)+e^x \left (-x^3+x^2 \log (16)\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.55, 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 \left (2\right )-2 x}\right )}{x}\) | \(28\) |
risch | \(-\frac {2 \ln \left ({\mathrm e}^{x}\right )}{x}-\frac {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 \left (2\right )-\frac {x}{4}}\right )^{2}-i \pi \,\mathrm {csgn}\left (\frac {i}{\ln \left (2\right )-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\frac {x}{4}}\right )^{2}+i \pi \,\mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\frac {x}{4}}\right )^{2}-i \pi \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\frac {x}{4}}\right )^{3}-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 \left (2\right )-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\frac {x}{4}}\right )+2 i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\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 \left (2\right )-\frac {x}{4}}\right ) \mathrm {csgn}\left (\frac {i \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\frac {x}{4}}\right )+i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x} \left (\frac {{\mathrm e}^{x}}{2}-x \right )}{\ln \left (2\right )-\frac {x}{4}}\right )^{3}-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 \left (2\right )-\frac {x}{4}}\right )^{2}+4 \ln \left (2\right )+2 \ln \left (\ln \left (2\right )-\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.52, size = 26, normalized size = 0.84 \begin {gather*} -\frac {2 \, {\left (\log \left (2\right ) - \log \left (2 \, x - e^{x}\right ) + \log \left (x - 4 \, \log \left (2\right )\right )\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, 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 \left (2\right )\right )}}\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.17, 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 {\left (2 \right )}} \right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 31, normalized size = 1.00 \begin {gather*} -\frac {2 \, {\left (\log \left (2\right ) - \log \left ({\left (2 \, x - e^{x}\right )} e^{\left (-x\right )}\right ) + \log \left (x - 4 \, \log \left (2\right )\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 \left (2\right )\,\left (4\,x-4\,x^2\right )-\ln \left (\frac {{\mathrm {e}}^{-x}\,\left (2\,x-{\mathrm {e}}^x\right )}{2\,x-8\,\ln \left (2\right )}\right )\,\left ({\mathrm {e}}^x\,\left (2\,x-8\,\ln \left (2\right )\right )+16\,x\,\ln \left (2\right )-4\,x^2\right )-2\,x\,{\mathrm {e}}^x+4\,x^3}{{\mathrm {e}}^x\,\left (4\,x^2\,\ln \left (2\right )-x^3\right )-8\,x^3\,\ln \left (2\right )+2\,x^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________