Optimal. Leaf size=33 \[ \frac {-x^2+\log \left (\frac {e^x}{3}\right )}{(-2+x) x}-\frac {-1+x}{\log (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.45, antiderivative size = 41, normalized size of antiderivative = 1.24, number
of steps used = 19, number of rules used = 15, integrand size = 89, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.168, Rules
used = {1608, 27, 6820, 6874, 78, 75, 2634, 36, 31, 29, 2395, 2334, 2335, 2339, 30}
\begin {gather*} \frac {2}{2-x}-\frac {x}{\log (x)}+\frac {1}{\log (x)}-\frac {\log \left (\frac {e^x}{3}\right )}{(2-x) x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 29
Rule 30
Rule 31
Rule 36
Rule 75
Rule 78
Rule 1608
Rule 2334
Rule 2335
Rule 2339
Rule 2395
Rule 2634
Rule 6820
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-4 x+8 x^2-5 x^3+x^4+\left (-4 x^2+4 x^3-x^4\right ) \log (x)+\left (-2 x+3 x^2\right ) \log ^2(x)+(2-2 x) \log \left (\frac {e^x}{3}\right ) \log ^2(x)}{x^2 \left (4-4 x+x^2\right ) \log ^2(x)} \, dx\\ &=\int \frac {-4 x+8 x^2-5 x^3+x^4+\left (-4 x^2+4 x^3-x^4\right ) \log (x)+\left (-2 x+3 x^2\right ) \log ^2(x)+(2-2 x) \log \left (\frac {e^x}{3}\right ) \log ^2(x)}{(-2+x)^2 x^2 \log ^2(x)} \, dx\\ &=\int \left (\frac {x (-2+3 x)-2 (-1+x) \log \left (\frac {e^x}{3}\right )}{(-2+x)^2 x^2}+\frac {-1+x}{x \log ^2(x)}-\frac {1}{\log (x)}\right ) \, dx\\ &=\int \frac {x (-2+3 x)-2 (-1+x) \log \left (\frac {e^x}{3}\right )}{(-2+x)^2 x^2} \, dx+\int \frac {-1+x}{x \log ^2(x)} \, dx-\int \frac {1}{\log (x)} \, dx\\ &=-\text {li}(x)+\int \left (\frac {-2+3 x}{(-2+x)^2 x}-\frac {2 (-1+x) \log \left (\frac {e^x}{3}\right )}{(-2+x)^2 x^2}\right ) \, dx+\int \left (\frac {1}{\log ^2(x)}-\frac {1}{x \log ^2(x)}\right ) \, dx\\ &=-\text {li}(x)-2 \int \frac {(-1+x) \log \left (\frac {e^x}{3}\right )}{(-2+x)^2 x^2} \, dx+\int \frac {-2+3 x}{(-2+x)^2 x} \, dx+\int \frac {1}{\log ^2(x)} \, dx-\int \frac {1}{x \log ^2(x)} \, dx\\ &=-\frac {\log \left (\frac {e^x}{3}\right )}{(2-x) x}-\frac {x}{\log (x)}-\text {li}(x)+2 \int \frac {1}{(4-2 x) x} \, dx+\int \left (\frac {2}{(-2+x)^2}+\frac {1}{2 (-2+x)}-\frac {1}{2 x}\right ) \, dx+\int \frac {1}{\log (x)} \, dx-\text {Subst}\left (\int \frac {1}{x^2} \, dx,x,\log (x)\right )\\ &=\frac {2}{2-x}-\frac {\log \left (\frac {e^x}{3}\right )}{(2-x) x}+\frac {1}{2} \log (2-x)+\frac {1}{\log (x)}-\frac {x}{\log (x)}-\frac {\log (x)}{2}+\frac {1}{2} \int \frac {1}{x} \, dx+\int \frac {1}{4-2 x} \, dx\\ &=\frac {2}{2-x}-\frac {\log \left (\frac {e^x}{3}\right )}{(2-x) x}+\frac {1}{\log (x)}-\frac {x}{\log (x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 40, normalized size = 1.21 \begin {gather*} \frac {-x \left (2-3 x+x^2\right )+\left (-2 x+\log \left (\frac {e^x}{3}\right )\right ) \log (x)}{(-2+x) x \log (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 42, normalized size = 1.27
method | result | size |
default | \(-\frac {2}{x -2}+\frac {1}{\ln \left (x \right )}-\frac {x}{\ln \left (x \right )}+\frac {\ln \left (\frac {{\mathrm e}^{x}}{3}\right )}{2 x -4}-\frac {\ln \left (\frac {{\mathrm e}^{x}}{3}\right )}{2 x}\) | \(42\) |
risch | \(\frac {\ln \left ({\mathrm e}^{x}\right )}{\left (x -2\right ) x}-\frac {2 x^{3}+2 \ln \left (3\right ) \ln \left (x \right )-6 x^{2}+4 x \ln \left (x \right )+4 x}{2 \ln \left (x \right ) \left (x -2\right ) x}\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 34, normalized size = 1.03 \begin {gather*} -\frac {x^{3} - 3 \, x^{2} + {\left (x + \log \left (3\right )\right )} \log \left (x\right ) + 2 \, x}{{\left (x^{2} - 2 \, x\right )} \log \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 34, normalized size = 1.03 \begin {gather*} -\frac {x^{3} - 3 \, x^{2} + {\left (x + \log \left (3\right )\right )} \log \left (x\right ) + 2 \, x}{{\left (x^{2} - 2 \, x\right )} \log \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.17, size = 19, normalized size = 0.58 \begin {gather*} \frac {1 - x}{\log {\left (x \right )}} + \frac {- x - \log {\left (3 \right )}}{x^{2} - 2 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 28, normalized size = 0.85 \begin {gather*} -\frac {\log \left (3\right ) + 2}{2 \, {\left (x - 2\right )}} + \frac {\log \left (3\right )}{2 \, x} - \frac {x - 1}{\log \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.71, size = 34, normalized size = 1.03 \begin {gather*} \frac {x+\ln \left (3\right )}{2\,x-x^2}-x+\frac {x\,\ln \left (x\right )-x+1}{\ln \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________