Optimal. Leaf size=23 \[ x+\log (3)-\log (x)+\log \left (-4+x^2\right )-\log \left (\log \left (\frac {x}{3}\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.32, antiderivative size = 25, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {1593, 6725, 1802, 2302, 29} \begin {gather*} x+\log (2-x)-\log (x)+\log (x+2)-\log \left (\log \left (\frac {x}{3}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 1593
Rule 1802
Rule 2302
Rule 6725
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4-x^2+\left (4-4 x+x^2+x^3\right ) \log \left (\frac {x}{3}\right )}{x \left (-4+x^2\right ) \log \left (\frac {x}{3}\right )} \, dx\\ &=\int \left (\frac {4-4 x+x^2+x^3}{x \left (-4+x^2\right )}-\frac {1}{x \log \left (\frac {x}{3}\right )}\right ) \, dx\\ &=\int \frac {4-4 x+x^2+x^3}{x \left (-4+x^2\right )} \, dx-\int \frac {1}{x \log \left (\frac {x}{3}\right )} \, dx\\ &=\int \left (1+\frac {1}{-2+x}-\frac {1}{x}+\frac {1}{2+x}\right ) \, dx-\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\log \left (\frac {x}{3}\right )\right )\\ &=x+\log (2-x)-\log (x)+\log (2+x)-\log \left (\log \left (\frac {x}{3}\right )\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 23, normalized size = 1.00 \begin {gather*} x-\log (x)+\log \left (4-x^2\right )-\log \left (\log \left (\frac {x}{3}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.60, size = 19, normalized size = 0.83 \begin {gather*} x + \log \left (x^{2} - 4\right ) - \log \relax (x) - \log \left (\log \left (\frac {1}{3} \, x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 19, normalized size = 0.83 \begin {gather*} x + \log \left (x^{2} - 4\right ) - \log \relax (x) - \log \left (\log \left (\frac {1}{3} \, x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 20, normalized size = 0.87
method | result | size |
risch | \(x -\ln \relax (x )+\ln \left (x^{2}-4\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) | \(20\) |
derivativedivides | \(x +\ln \left (2+x \right )-\ln \left (\frac {x}{3}\right )+\ln \left (x -2\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) | \(24\) |
default | \(x +\ln \left (2+x \right )-\ln \left (\frac {x}{3}\right )+\ln \left (x -2\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) | \(24\) |
norman | \(x +\ln \left (2+x \right )-\ln \left (\frac {x}{3}\right )+\ln \left (x -2\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 24, normalized size = 1.04 \begin {gather*} x + \log \left (x + 2\right ) + \log \left (x - 2\right ) - \log \relax (x) - \log \left (-\log \relax (3) + \log \relax (x)\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.54, size = 21, normalized size = 0.91 \begin {gather*} x+\ln \left (x+2\right )+\ln \left (\frac {x-2}{x}\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 17, normalized size = 0.74 \begin {gather*} x - \log {\relax (x )} + \log {\left (x^{2} - 4 \right )} - \log {\left (\log {\left (\frac {x}{3} \right )} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________