Optimal. Leaf size=41 \[ \frac{x^3}{6}+\frac{x^2}{2}+\frac{3}{4} \log \left (x^2-4 x+5\right )+\frac{3 x}{2}+6 \tan ^{-1}(2-x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0276182, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {1657, 634, 618, 204, 628} \[ \frac{x^3}{6}+\frac{x^2}{2}+\frac{3}{4} \log \left (x^2-4 x+5\right )+\frac{3 x}{2}+6 \tan ^{-1}(2-x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1657
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{-3+x-2 x^3+x^4}{10-8 x+2 x^2} \, dx &=\int \left (\frac{3}{2}+x+\frac{x^2}{2}-\frac{3 (6-x)}{10-8 x+2 x^2}\right ) \, dx\\ &=\frac{3 x}{2}+\frac{x^2}{2}+\frac{x^3}{6}-3 \int \frac{6-x}{10-8 x+2 x^2} \, dx\\ &=\frac{3 x}{2}+\frac{x^2}{2}+\frac{x^3}{6}+\frac{3}{4} \int \frac{-8+4 x}{10-8 x+2 x^2} \, dx-12 \int \frac{1}{10-8 x+2 x^2} \, dx\\ &=\frac{3 x}{2}+\frac{x^2}{2}+\frac{x^3}{6}+\frac{3}{4} \log \left (5-4 x+x^2\right )+24 \operatorname{Subst}\left (\int \frac{1}{-16-x^2} \, dx,x,-8+4 x\right )\\ &=\frac{3 x}{2}+\frac{x^2}{2}+\frac{x^3}{6}+6 \tan ^{-1}(2-x)+\frac{3}{4} \log \left (5-4 x+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.009641, size = 39, normalized size = 0.95 \[ \frac{1}{2} \left (\frac{x^3}{3}+x^2+\frac{3}{2} \log \left (x^2-4 x+5\right )+3 x+12 \tan ^{-1}(2-x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 32, normalized size = 0.8 \begin{align*}{\frac{3\,x}{2}}+{\frac{{x}^{2}}{2}}+{\frac{{x}^{3}}{6}}-6\,\arctan \left ( -2+x \right ) +{\frac{3\,\ln \left ({x}^{2}-4\,x+5 \right ) }{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.45813, size = 42, normalized size = 1.02 \begin{align*} \frac{1}{6} \, x^{3} + \frac{1}{2} \, x^{2} + \frac{3}{2} \, x - 6 \, \arctan \left (x - 2\right ) + \frac{3}{4} \, \log \left (x^{2} - 4 \, x + 5\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.56159, size = 95, normalized size = 2.32 \begin{align*} \frac{1}{6} \, x^{3} + \frac{1}{2} \, x^{2} + \frac{3}{2} \, x - 6 \, \arctan \left (x - 2\right ) + \frac{3}{4} \, \log \left (x^{2} - 4 \, x + 5\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.110648, size = 34, normalized size = 0.83 \begin{align*} \frac{x^{3}}{6} + \frac{x^{2}}{2} + \frac{3 x}{2} + \frac{3 \log{\left (x^{2} - 4 x + 5 \right )}}{4} - 6 \operatorname{atan}{\left (x - 2 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12129, size = 42, normalized size = 1.02 \begin{align*} \frac{1}{6} \, x^{3} + \frac{1}{2} \, x^{2} + \frac{3}{2} \, x - 6 \, \arctan \left (x - 2\right ) + \frac{3}{4} \, \log \left (x^{2} - 4 \, x + 5\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]