Optimal. Leaf size=43 \[ -\frac {1}{2} \tan ^{-1}\left (\frac {x}{\sqrt {2+x^2}}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {3} x}{\sqrt {2+x^2}}\right )}{2 \sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {1189, 385, 212,
209} \begin {gather*} -\frac {1}{2} \text {ArcTan}\left (\frac {x}{\sqrt {x^2+2}}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {3} x}{\sqrt {x^2+2}}\right )}{2 \sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 385
Rule 1189
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {2+x^2} \left (-1+x^4\right )} \, dx &=-\left (\frac {1}{2} \int \frac {1}{\left (1-x^2\right ) \sqrt {2+x^2}} \, dx\right )-\frac {1}{2} \int \frac {1}{\left (1+x^2\right ) \sqrt {2+x^2}} \, dx\\ &=-\left (\frac {1}{2} \text {Subst}\left (\int \frac {1}{1-3 x^2} \, dx,x,\frac {x}{\sqrt {2+x^2}}\right )\right )-\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {x}{\sqrt {2+x^2}}\right )\\ &=-\frac {1}{2} \tan ^{-1}\left (\frac {x}{\sqrt {2+x^2}}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {3} x}{\sqrt {2+x^2}}\right )}{2 \sqrt {3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 57, normalized size = 1.33 \begin {gather*} \frac {1}{6} \left (3 \tan ^{-1}\left (1+x^2-x \sqrt {2+x^2}\right )-\sqrt {3} \tanh ^{-1}\left (\frac {1-x^2+x \sqrt {2+x^2}}{\sqrt {3}}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(69\) vs.
\(2(31)=62\).
time = 0.15, size = 70, normalized size = 1.63
method | result | size |
default | \(-\frac {\sqrt {3}\, \arctanh \left (\frac {\left (2 x +4\right ) \sqrt {3}}{6 \sqrt {\left (-1+x \right )^{2}+1+2 x}}\right )}{12}+\frac {\sqrt {3}\, \arctanh \left (\frac {\left (-2 x +4\right ) \sqrt {3}}{6 \sqrt {\left (1+x \right )^{2}+1-2 x}}\right )}{12}-\frac {\arctan \left (\frac {x}{\sqrt {x^{2}+2}}\right )}{2}\) | \(70\) |
trager | \(-\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (\frac {\sqrt {x^{2}+2}\, x +\RootOf \left (\textit {\_Z}^{2}+1\right )}{x^{2}+1}\right )}{4}-\frac {\RootOf \left (\textit {\_Z}^{2}-3\right ) \ln \left (-\frac {2 \RootOf \left (\textit {\_Z}^{2}-3\right ) x^{2}+3 \sqrt {x^{2}+2}\, x +\RootOf \left (\textit {\_Z}^{2}-3\right )}{\left (1+x \right ) \left (-1+x \right )}\right )}{12}\) | \(84\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs.
\(2 (31) = 62\).
time = 0.42, size = 72, normalized size = 1.67 \begin {gather*} \frac {1}{12} \, \sqrt {3} \log \left (\frac {4 \, x^{2} - \sqrt {3} {\left (2 \, x^{2} + 1\right )} - \sqrt {x^{2} + 2} {\left (2 \, \sqrt {3} x - 3 \, x\right )} + 2}{x^{2} - 1}\right ) - \frac {1}{2} \, \arctan \left (-x^{2} + \sqrt {x^{2} + 2} x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (x - 1\right ) \left (x + 1\right ) \left (x^{2} + 1\right ) \sqrt {x^{2} + 2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 74 vs.
\(2 (31) = 62\).
time = 0.46, size = 74, normalized size = 1.72 \begin {gather*} -\frac {1}{12} \, \sqrt {3} \log \left (\frac {{\left | 2 \, {\left (x - \sqrt {x^{2} + 2}\right )}^{2} - 4 \, \sqrt {3} - 8 \right |}}{{\left | 2 \, {\left (x - \sqrt {x^{2} + 2}\right )}^{2} + 4 \, \sqrt {3} - 8 \right |}}\right ) + \frac {1}{2} \, \arctan \left (\frac {1}{2} \, {\left (x - \sqrt {x^{2} + 2}\right )}^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 107, normalized size = 2.49 \begin {gather*} \frac {\sqrt {3}\,\left (\ln \left (x-1\right )-\ln \left (x+\sqrt {3}\,\sqrt {x^2+2}+2\right )\right )}{12}-\frac {\sqrt {3}\,\left (\ln \left (x+1\right )-\ln \left (\sqrt {3}\,\sqrt {x^2+2}-x+2\right )\right )}{12}+\frac {\ln \left (\sqrt {x^2+2}+2-x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4}-\frac {\ln \left (\sqrt {x^2+2}+2+x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4}+\frac {\ln \left (x-\mathrm {i}\right )\,1{}\mathrm {i}}{4}-\frac {\ln \left (x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________