Optimal. Leaf size=22 \[ \frac{x^2}{2}-\frac{2}{7} \tanh ^{-1}\left (\frac{1}{7} (2 x+1)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0150512, antiderivative size = 26, normalized size of antiderivative = 1.18, number of steps used = 5, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {1657, 616, 31} \[ \frac{x^2}{2}+\frac{1}{7} \log (3-x)-\frac{1}{7} \log (x+4) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1657
Rule 616
Rule 31
Rubi steps
\begin{align*} \int \frac{1-12 x+x^2+x^3}{-12+x+x^2} \, dx &=\int \left (x+\frac{1}{-12+x+x^2}\right ) \, dx\\ &=\frac{x^2}{2}+\int \frac{1}{-12+x+x^2} \, dx\\ &=\frac{x^2}{2}+\frac{1}{7} \int \frac{1}{-3+x} \, dx-\frac{1}{7} \int \frac{1}{4+x} \, dx\\ &=\frac{x^2}{2}+\frac{1}{7} \log (3-x)-\frac{1}{7} \log (4+x)\\ \end{align*}
Mathematica [A] time = 0.0056404, size = 26, normalized size = 1.18 \[ \frac{x^2}{2}+\frac{1}{7} \log (3-x)-\frac{1}{7} \log (x+4) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 19, normalized size = 0.9 \begin{align*}{\frac{{x}^{2}}{2}}+{\frac{\ln \left ( -3+x \right ) }{7}}-{\frac{\ln \left ( 4+x \right ) }{7}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.02487, size = 24, normalized size = 1.09 \begin{align*} \frac{1}{2} \, x^{2} - \frac{1}{7} \, \log \left (x + 4\right ) + \frac{1}{7} \, \log \left (x - 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.46019, size = 58, normalized size = 2.64 \begin{align*} \frac{1}{2} \, x^{2} - \frac{1}{7} \, \log \left (x + 4\right ) + \frac{1}{7} \, \log \left (x - 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.089506, size = 17, normalized size = 0.77 \begin{align*} \frac{x^{2}}{2} + \frac{\log{\left (x - 3 \right )}}{7} - \frac{\log{\left (x + 4 \right )}}{7} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12496, size = 27, normalized size = 1.23 \begin{align*} \frac{1}{2} \, x^{2} - \frac{1}{7} \, \log \left ({\left | x + 4 \right |}\right ) + \frac{1}{7} \, \log \left ({\left | x - 3 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]