Optimal. Leaf size=27 \[ x+\frac {x^2}{6}-\log \left (x^2\right )+\log \left (-14 \left (3-\frac {x^2}{3}\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 23, normalized size of antiderivative = 0.85, number of steps used = 3, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {1593, 1802} \begin {gather*} \frac {x^2}{6}+x+\log (3-x)-2 \log (x)+\log (x+3) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1802
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {54-27 x-9 x^2+3 x^3+x^4}{x \left (-27+3 x^2\right )} \, dx\\ &=\int \left (1+\frac {1}{-3+x}-\frac {2}{x}+\frac {x}{3}+\frac {1}{3+x}\right ) \, dx\\ &=x+\frac {x^2}{6}+\log (3-x)-2 \log (x)+\log (3+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 21, normalized size = 0.78 \begin {gather*} x+\frac {x^2}{6}-2 \log (x)+\log \left (9-x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 17, normalized size = 0.63 \begin {gather*} \frac {1}{6} \, x^{2} + x + \log \left (x^{2} - 9\right ) - 2 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 22, normalized size = 0.81 \begin {gather*} \frac {1}{6} \, x^{2} + x + \log \left ({\left | x + 3 \right |}\right ) + \log \left ({\left | x - 3 \right |}\right ) - 2 \, \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 18, normalized size = 0.67
method | result | size |
risch | \(x +\frac {x^{2}}{6}-2 \ln \relax (x )+\ln \left (x^{2}-9\right )\) | \(18\) |
default | \(x +\frac {x^{2}}{6}-2 \ln \relax (x )+\ln \left (x -3\right )+\ln \left (3+x \right )\) | \(20\) |
norman | \(x +\frac {x^{2}}{6}-2 \ln \relax (x )+\ln \left (x -3\right )+\ln \left (3+x \right )\) | \(20\) |
meijerg | \(-2 \ln \relax (x )+2 \ln \relax (3)-i \pi +\ln \left (1-\frac {x^{2}}{9}\right )+\frac {x^{2}}{6}-\frac {3 i \left (\frac {2 i x}{3}-2 i \arctanh \left (\frac {x}{3}\right )\right )}{2}+3 \arctanh \left (\frac {x}{3}\right )\) | \(48\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 19, normalized size = 0.70 \begin {gather*} \frac {1}{6} \, x^{2} + x + \log \left (x + 3\right ) + \log \left (x - 3\right ) - 2 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.46, size = 17, normalized size = 0.63 \begin {gather*} x+\ln \left (x^2-9\right )-2\,\ln \relax (x)+\frac {x^2}{6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.09, size = 17, normalized size = 0.63 \begin {gather*} \frac {x^{2}}{6} + x - 2 \log {\relax (x )} + \log {\left (x^{2} - 9 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________