Optimal. Leaf size=25 \[ -4-x+x^2-\frac {2 (2-x) x}{3+x}-\log (x) \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 16, normalized size of antiderivative = 0.64, number of steps used = 4, number of rules used = 3, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {1594, 27, 1620} \begin {gather*} x^2+x+\frac {30}{x+3}-\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 1594
Rule 1620
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-9-27 x+23 x^2+13 x^3+2 x^4}{x \left (9+6 x+x^2\right )} \, dx\\ &=\int \frac {-9-27 x+23 x^2+13 x^3+2 x^4}{x (3+x)^2} \, dx\\ &=\int \left (1-\frac {1}{x}+2 x-\frac {30}{(3+x)^2}\right ) \, dx\\ &=x+x^2+\frac {30}{3+x}-\log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 16, normalized size = 0.64 \begin {gather*} x+x^2+\frac {30}{3+x}-\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 26, normalized size = 1.04 \begin {gather*} \frac {x^{3} + 4 \, x^{2} - {\left (x + 3\right )} \log \relax (x) + 3 \, x + 30}{x + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 17, normalized size = 0.68 \begin {gather*} x^{2} + x + \frac {30}{x + 3} - \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 17, normalized size = 0.68
method | result | size |
default | \(x^{2}+x -\ln \relax (x )+\frac {30}{3+x}\) | \(17\) |
risch | \(x^{2}+x -\ln \relax (x )+\frac {30}{3+x}\) | \(17\) |
norman | \(\frac {x^{3}+4 x^{2}+21}{3+x}-\ln \relax (x )\) | \(22\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 16, normalized size = 0.64 \begin {gather*} x^{2} + x + \frac {30}{x + 3} - \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.12, size = 16, normalized size = 0.64 \begin {gather*} x-\ln \relax (x)+\frac {30}{x+3}+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.09, size = 12, normalized size = 0.48 \begin {gather*} x^{2} + x - \log {\relax (x )} + \frac {30}{x + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________