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.11, antiderivative size = 29, normalized size of antiderivative = 1.00, 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 203
Rule 260
Rule 635
Rule 6725
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.01, size = 29, normalized size = 1.00 \[ \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]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 24, normalized size = 0.83 \[ \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) - 3 \, \arctan \relax (x) + \frac {3}{2} \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.03, size = 24, normalized size = 0.83 \[ \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) - 3 \, \arctan \relax (x) + \frac {3}{2} \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 25, normalized size = 0.86 \[ -3 \arctan \relax (x )+\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, x}{2}\right )+\frac {3 \ln \left (x^{2}+1\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.25, size = 24, normalized size = 0.83 \[ \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) - 3 \, \arctan \relax (x) + \frac {3}{2} \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 51, normalized size = 1.76 \[ -\sqrt {2}\,\mathrm {atan}\left (\frac {24\,\sqrt {2}}{24\,x-64}+\frac {32\,\sqrt {2}\,x}{24\,x-64}\right )+\ln \left (x-\mathrm {i}\right )\,\left (\frac {3}{2}+\frac {3}{2}{}\mathrm {i}\right )+\ln \left (x+1{}\mathrm {i}\right )\,\left (\frac {3}{2}-\frac {3}{2}{}\mathrm {i}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.21, size = 29, normalized size = 1.00 \[ \frac {3 \log {\left (x^{2} + 1 \right )}}{2} - 3 \operatorname {atan}{\relax (x )} + \sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} x}{2} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________