Optimal. Leaf size=36 \[ 2 \log \left (x^2+1\right )-2 \log \left (x^2+2\right )+3 \tan ^{-1}(x)-\frac {3 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {1010, 391, 203, 444, 36, 31} \[ 2 \log \left (x^2+1\right )-2 \log \left (x^2+2\right )+3 \tan ^{-1}(x)-\frac {3 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 203
Rule 391
Rule 444
Rule 1010
Rubi steps
\begin {align*} \int \frac {3+4 x}{\left (1+x^2\right ) \left (2+x^2\right )} \, dx &=3 \int \frac {1}{\left (1+x^2\right ) \left (2+x^2\right )} \, dx+4 \int \frac {x}{\left (1+x^2\right ) \left (2+x^2\right )} \, dx\\ &=2 \operatorname {Subst}\left (\int \frac {1}{(1+x) (2+x)} \, dx,x,x^2\right )+3 \int \frac {1}{1+x^2} \, dx-3 \int \frac {1}{2+x^2} \, dx\\ &=3 \tan ^{-1}(x)-\frac {3 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}}+2 \operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,x^2\right )-2 \operatorname {Subst}\left (\int \frac {1}{2+x} \, dx,x,x^2\right )\\ &=3 \tan ^{-1}(x)-\frac {3 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}}+2 \log \left (1+x^2\right )-2 \log \left (2+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 36, normalized size = 1.00 \[ 2 \log \left (x^2+1\right )-2 \log \left (x^2+2\right )+3 \tan ^{-1}(x)-\frac {3 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 33, normalized size = 0.92 \[ -\frac {3}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + 3 \, \arctan \relax (x) - 2 \, \log \left (x^{2} + 2\right ) + 2 \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 33, normalized size = 0.92 \[ -\frac {3}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + 3 \, \arctan \relax (x) - 2 \, \log \left (x^{2} + 2\right ) + 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 = 34, normalized size = 0.94 \[ 3 \arctan \relax (x )-\frac {3 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, x}{2}\right )}{2}+2 \ln \left (x^{2}+1\right )-2 \ln \left (x^{2}+2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 2.06, size = 33, normalized size = 0.92 \[ -\frac {3}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + 3 \, \arctan \relax (x) - 2 \, \log \left (x^{2} + 2\right ) + 2 \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 56, normalized size = 1.56 \[ \ln \left (x-\mathrm {i}\right )\,\left (2-\frac {3}{2}{}\mathrm {i}\right )+\ln \left (x+1{}\mathrm {i}\right )\,\left (2+\frac {3}{2}{}\mathrm {i}\right )+\ln \left (x-\sqrt {2}\,1{}\mathrm {i}\right )\,\left (-2+\frac {\sqrt {2}\,3{}\mathrm {i}}{4}\right )-\ln \left (x+\sqrt {2}\,1{}\mathrm {i}\right )\,\left (2+\frac {\sqrt {2}\,3{}\mathrm {i}}{4}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.19, size = 39, normalized size = 1.08 \[ 2 \log {\left (x^{2} + 1 \right )} - 2 \log {\left (x^{2} + 2 \right )} + 3 \operatorname {atan}{\relax (x )} - \frac {3 \sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} x}{2} \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________