Optimal. Leaf size=36 \[ 6 \tan ^{-1}(x)-5 \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )-\frac {1}{2} \log \left (1+x^2\right )+\log \left (2+x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {6857, 649, 209,
266} \begin {gather*} -\frac {1}{2} \log \left (x^2+1\right )+\log \left (x^2+2\right )+6 \tan ^{-1}(x)-5 \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 6857
Rubi steps
\begin {align*} \int \frac {2-4 x^2+x^3}{\left (1+x^2\right ) \left (2+x^2\right )} \, dx &=\int \left (\frac {6-x}{1+x^2}+\frac {2 (-5+x)}{2+x^2}\right ) \, dx\\ &=2 \int \frac {-5+x}{2+x^2} \, dx+\int \frac {6-x}{1+x^2} \, dx\\ &=2 \int \frac {x}{2+x^2} \, dx+6 \int \frac {1}{1+x^2} \, dx-10 \int \frac {1}{2+x^2} \, dx-\int \frac {x}{1+x^2} \, dx\\ &=6 \tan ^{-1}(x)-5 \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )-\frac {1}{2} \log \left (1+x^2\right )+\log \left (2+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 36, normalized size = 1.00 \begin {gather*} 6 \tan ^{-1}(x)-5 \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )-\frac {1}{2} \log \left (1+x^2\right )+\log \left (2+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 1.91, size = 31, normalized size = 0.86 \begin {gather*} \text {Log}\left [2+x^2\right ]-5 \sqrt {2} \text {ArcTan}\left [\frac {\sqrt {2} x}{2}\right ]-\frac {\text {Log}\left [1+x^2\right ]}{2}+6 \text {ArcTan}\left [x\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 32, normalized size = 0.89
method | result | size |
default | \(6 \arctan \left (x \right )-\frac {\ln \left (x^{2}+1\right )}{2}+\ln \left (x^{2}+2\right )-5 \arctan \left (\frac {x \sqrt {2}}{2}\right ) \sqrt {2}\) | \(32\) |
risch | \(6 \arctan \left (x \right )-\frac {\ln \left (x^{2}+1\right )}{2}+\ln \left (x^{2}+2\right )-5 \arctan \left (\frac {x \sqrt {2}}{2}\right ) \sqrt {2}\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.35, size = 31, normalized size = 0.86 \begin {gather*} -5 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + 6 \, \arctan \left (x\right ) + \log \left (x^{2} + 2\right ) - \frac {1}{2} \, \log \left (x^{2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 31, normalized size = 0.86 \begin {gather*} -5 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + 6 \, \arctan \left (x\right ) + \log \left (x^{2} + 2\right ) - \frac {1}{2} \, \log \left (x^{2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.11, size = 36, normalized size = 1.00 \begin {gather*} - \frac {\log {\left (x^{2} + 1 \right )}}{2} + \log {\left (x^{2} + 2 \right )} + 6 \operatorname {atan}{\left (x \right )} - 5 \sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} x}{2} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 41, normalized size = 1.14 \begin {gather*} -\frac {\ln \left (x^{2}+1\right )}{2}+6 \arctan x+\ln \left (x^{2}+2\right )-\frac {20 \arctan \left (\frac {x}{\sqrt {2}}\right )}{2 \sqrt {2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 56, normalized size = 1.56 \begin {gather*} \ln \left (x-\mathrm {i}\right )\,\left (-\frac {1}{2}-3{}\mathrm {i}\right )+\ln \left (x+1{}\mathrm {i}\right )\,\left (-\frac {1}{2}+3{}\mathrm {i}\right )+\ln \left (x-\sqrt {2}\,1{}\mathrm {i}\right )\,\left (1+\frac {\sqrt {2}\,5{}\mathrm {i}}{2}\right )-\ln \left (x+\sqrt {2}\,1{}\mathrm {i}\right )\,\left (-1+\frac {\sqrt {2}\,5{}\mathrm {i}}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________