Optimal. Leaf size=29 \[ \frac{3}{2} \log \left (x^2+1\right )-3 \tan ^{-1}(x)+\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.113992, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {6725, 635, 203, 260} \[ \frac{3}{2} \log \left (x^2+1\right )-3 \tan ^{-1}(x)+\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6725
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \frac{-4+6 x-x^2+3 x^3}{\left (1+x^2\right ) \left (2+x^2\right )} \, dx &=\int \left (\frac{3 (-1+x)}{1+x^2}+\frac{2}{2+x^2}\right ) \, dx\\ &=2 \int \frac{1}{2+x^2} \, dx+3 \int \frac{-1+x}{1+x^2} \, dx\\ &=\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right )-3 \int \frac{1}{1+x^2} \, dx+3 \int \frac{x}{1+x^2} \, dx\\ &=-3 \tan ^{-1}(x)+\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right )+\frac{3}{2} \log \left (1+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.013264, size = 29, normalized size = 1. \[ \frac{3}{2} \log \left (x^2+1\right )-3 \tan ^{-1}(x)+\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 25, normalized size = 0.9 \begin{align*} -3\,\arctan \left ( x \right ) +{\frac{3\,\ln \left ({x}^{2}+1 \right ) }{2}}+\arctan \left ({\frac{x\sqrt{2}}{2}} \right ) \sqrt{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.40795, size = 32, normalized size = 1.1 \begin{align*} \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - 3 \, \arctan \left (x\right ) + \frac{3}{2} \, \log \left (x^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.81724, size = 86, normalized size = 2.97 \begin{align*} \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - 3 \, \arctan \left (x\right ) + \frac{3}{2} \, \log \left (x^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.16258, size = 29, normalized size = 1. \begin{align*} \frac{3 \log{\left (x^{2} + 1 \right )}}{2} - 3 \operatorname{atan}{\left (x \right )} + \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.06316, size = 32, normalized size = 1.1 \begin{align*} \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - 3 \, \arctan \left (x\right ) + \frac{3}{2} \, \log \left (x^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]