Optimal. Leaf size=26 \[ x+x \left (-x+\frac {-1+\frac {4+2 x}{\log (3+x)}}{x^2}\right ) \]
________________________________________________________________________________________
Rubi [F] time = 0.50, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {-4 x-2 x^2+(-12-4 x) \log (3+x)+\left (3+x+3 x^2-5 x^3-2 x^4\right ) \log ^2(3+x)}{\left (3 x^2+x^3\right ) \log ^2(3+x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-4 x-2 x^2+(-12-4 x) \log (3+x)+\left (3+x+3 x^2-5 x^3-2 x^4\right ) \log ^2(3+x)}{x^2 (3+x) \log ^2(3+x)} \, dx\\ &=\int \left (\frac {1+x^2-2 x^3}{x^2}-\frac {2 (2+x)}{x (3+x) \log ^2(3+x)}-\frac {4}{x^2 \log (3+x)}\right ) \, dx\\ &=-\left (2 \int \frac {2+x}{x (3+x) \log ^2(3+x)} \, dx\right )-4 \int \frac {1}{x^2 \log (3+x)} \, dx+\int \frac {1+x^2-2 x^3}{x^2} \, dx\\ &=-\left (2 \int \left (\frac {2}{3 x \log ^2(3+x)}+\frac {1}{3 (3+x) \log ^2(3+x)}\right ) \, dx\right )-4 \int \frac {1}{x^2 \log (3+x)} \, dx+\int \left (1+\frac {1}{x^2}-2 x\right ) \, dx\\ &=-\frac {1}{x}+x-x^2-\frac {2}{3} \int \frac {1}{(3+x) \log ^2(3+x)} \, dx-\frac {4}{3} \int \frac {1}{x \log ^2(3+x)} \, dx-4 \int \frac {1}{x^2 \log (3+x)} \, dx\\ &=-\frac {1}{x}+x-x^2-\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{x \log ^2(x)} \, dx,x,3+x\right )-\frac {4}{3} \int \frac {1}{x \log ^2(3+x)} \, dx-4 \int \frac {1}{x^2 \log (3+x)} \, dx\\ &=-\frac {1}{x}+x-x^2-\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{x^2} \, dx,x,\log (3+x)\right )-\frac {4}{3} \int \frac {1}{x \log ^2(3+x)} \, dx-4 \int \frac {1}{x^2 \log (3+x)} \, dx\\ &=-\frac {1}{x}+x-x^2+\frac {2}{3 \log (3+x)}-\frac {4}{3} \int \frac {1}{x \log ^2(3+x)} \, dx-4 \int \frac {1}{x^2 \log (3+x)} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 26, normalized size = 1.00 \begin {gather*} -\frac {1}{x}+x-x^2+\frac {2 (2+x)}{x \log (3+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 31, normalized size = 1.19 \begin {gather*} -\frac {{\left (x^{3} - x^{2} + 1\right )} \log \left (x + 3\right ) - 2 \, x - 4}{x \log \left (x + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.29, size = 26, normalized size = 1.00 \begin {gather*} -x^{2} + x - \frac {1}{x} + \frac {2 \, {\left (x + 2\right )}}{x \log \left (x + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.38, size = 31, normalized size = 1.19
method | result | size |
risch | \(-\frac {x^{3}-x^{2}+1}{x}+\frac {2 x +4}{x \ln \left (3+x \right )}\) | \(31\) |
norman | \(\frac {4+\ln \left (3+x \right ) x^{2}+2 x -\ln \left (3+x \right ) x^{3}-\ln \left (3+x \right )}{x \ln \left (3+x \right )}\) | \(39\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.50, size = 31, normalized size = 1.19 \begin {gather*} -\frac {{\left (x^{3} - x^{2} + 1\right )} \log \left (x + 3\right ) - 2 \, x - 4}{x \log \left (x + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.17, size = 31, normalized size = 1.19 \begin {gather*} x+\frac {2}{\ln \left (x+3\right )}-\frac {1}{x}-x^2+\frac {4}{x\,\ln \left (x+3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 19, normalized size = 0.73 \begin {gather*} - x^{2} + x + \frac {2 x + 4}{x \log {\left (x + 3 \right )}} - \frac {1}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________