Optimal. Leaf size=83 \[ \frac {2 \sqrt {-2 x^2+x^4} \tan ^{-1}\left (\frac {1}{2} \sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}-\frac {\sqrt {-2 x^2+x^4} \tan ^{-1}\left (\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {2081, 585, 85,
65, 209} \begin {gather*} \frac {2 \sqrt {x^4-2 x^2} \text {ArcTan}\left (\frac {\sqrt {x^2-2}}{2}\right )}{3 x \sqrt {x^2-2}}-\frac {\sqrt {x^4-2 x^2} \text {ArcTan}\left (\sqrt {x^2-2}\right )}{3 x \sqrt {x^2-2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 85
Rule 209
Rule 585
Rule 2081
Rubi steps
\begin {align*} \int \frac {\sqrt {-2 x^2+x^4}}{\left (-1+x^2\right ) \left (2+x^2\right )} \, dx &=\frac {\sqrt {-2 x^2+x^4} \int \frac {x \sqrt {-2+x^2}}{\left (-1+x^2\right ) \left (2+x^2\right )} \, dx}{x \sqrt {-2+x^2}}\\ &=\frac {\sqrt {-2 x^2+x^4} \text {Subst}\left (\int \frac {\sqrt {-2+x}}{(-1+x) (2+x)} \, dx,x,x^2\right )}{2 x \sqrt {-2+x^2}}\\ &=-\frac {\sqrt {-2 x^2+x^4} \text {Subst}\left (\int \frac {1}{\sqrt {-2+x} (-1+x)} \, dx,x,x^2\right )}{6 x \sqrt {-2+x^2}}+\frac {\left (2 \sqrt {-2 x^2+x^4}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-2+x} (2+x)} \, dx,x,x^2\right )}{3 x \sqrt {-2+x^2}}\\ &=-\frac {\sqrt {-2 x^2+x^4} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}+\frac {\left (4 \sqrt {-2 x^2+x^4}\right ) \text {Subst}\left (\int \frac {1}{4+x^2} \, dx,x,\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}\\ &=\frac {2 \sqrt {-2 x^2+x^4} \tan ^{-1}\left (\frac {1}{2} \sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}-\frac {\sqrt {-2 x^2+x^4} \tan ^{-1}\left (\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 56, normalized size = 0.67 \begin {gather*} \frac {x \sqrt {-2+x^2} \left (2 \tan ^{-1}\left (\frac {1}{2} \sqrt {-2+x^2}\right )-\tan ^{-1}\left (\sqrt {-2+x^2}\right )\right )}{3 \sqrt {x^2 \left (-2+x^2\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.32, size = 63, normalized size = 0.76
method | result | size |
default | \(-\frac {\sqrt {x^{4}-2 x^{2}}\, \left (\arctan \left (\frac {x -2}{\sqrt {x^{2}-2}}\right )-\arctan \left (\frac {x +2}{\sqrt {x^{2}-2}}\right )-4 \arctan \left (\frac {\sqrt {x^{2}-2}}{2}\right )\right )}{6 x \sqrt {x^{2}-2}}\) | \(63\) |
trager | \(\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) x^{7}-15 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{5}-6 \sqrt {x^{4}-2 x^{2}}\, x^{4}+24 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{3}+16 \sqrt {x^{4}-2 x^{2}}\, x^{2}-12 x \RootOf \left (\textit {\_Z}^{2}+1\right )-8 \sqrt {x^{4}-2 x^{2}}}{\left (x^{2}+2\right )^{2} x \left (1+x \right ) \left (-1+x \right )}\right )}{6}\) | \(119\) |
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 [A]
time = 0.35, size = 38, normalized size = 0.46 \begin {gather*} -\frac {1}{3} \, \arctan \left (\frac {\sqrt {x^{4} - 2 \, x^{2}}}{x}\right ) + \frac {2}{3} \, \arctan \left (\frac {\sqrt {x^{4} - 2 \, x^{2}}}{2 \, x}\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 {\sqrt {x^{2} \left (x^{2} - 2\right )}}{\left (x - 1\right ) \left (x + 1\right ) \left (x^{2} + 2\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 3.11, size = 46, normalized size = 0.55 \begin {gather*} \frac {1}{3} \, {\left (\arctan \left (i \, \sqrt {2}\right ) - 2 \, \arctan \left (\frac {1}{2} i \, \sqrt {2}\right )\right )} \mathrm {sgn}\left (x\right ) + \frac {2}{3} \, \arctan \left (\frac {1}{2} \, \sqrt {x^{2} - 2}\right ) \mathrm {sgn}\left (x\right ) - \frac {1}{3} \, \arctan \left (\sqrt {x^{2} - 2}\right ) \mathrm {sgn}\left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {x^4-2\,x^2}}{\left (x^2-1\right )\,\left (x^2+2\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________