Optimal. Leaf size=23 \[ \frac{x^2}{2}+2 x+9 \log (3-x)+\log (x+1) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0267258, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {1593, 1628, 632, 31} \[ \frac{x^2}{2}+2 x+9 \log (3-x)+\log (x+1) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1628
Rule 632
Rule 31
Rubi steps
\begin{align*} \int \frac{3 x+x^3}{-3-2 x+x^2} \, dx &=\int \frac{x \left (3+x^2\right )}{-3-2 x+x^2} \, dx\\ &=\int \left (2+x+\frac{2 (3+5 x)}{-3-2 x+x^2}\right ) \, dx\\ &=2 x+\frac{x^2}{2}+2 \int \frac{3+5 x}{-3-2 x+x^2} \, dx\\ &=2 x+\frac{x^2}{2}+9 \int \frac{1}{-3+x} \, dx+\int \frac{1}{1+x} \, dx\\ &=2 x+\frac{x^2}{2}+9 \log (3-x)+\log (1+x)\\ \end{align*}
Mathematica [A] time = 0.0039116, size = 23, normalized size = 1. \[ \frac{x^2}{2}+2 x+9 \log (3-x)+\log (x+1) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 20, normalized size = 0.9 \begin{align*}{\frac{{x}^{2}}{2}}+2\,x+\ln \left ( 1+x \right ) +9\,\ln \left ( -3+x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.943727, size = 26, normalized size = 1.13 \begin{align*} \frac{1}{2} \, x^{2} + 2 \, x + \log \left (x + 1\right ) + 9 \, \log \left (x - 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.727047, size = 58, normalized size = 2.52 \begin{align*} \frac{1}{2} \, x^{2} + 2 \, x + \log \left (x + 1\right ) + 9 \, \log \left (x - 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.102927, size = 19, normalized size = 0.83 \begin{align*} \frac{x^{2}}{2} + 2 x + 9 \log{\left (x - 3 \right )} + \log{\left (x + 1 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.07347, size = 28, normalized size = 1.22 \begin{align*} \frac{1}{2} \, x^{2} + 2 \, x + \log \left ({\left | x + 1 \right |}\right ) + 9 \, \log \left ({\left | x - 3 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]