Optimal. Leaf size=123 \[ \frac{\left (1-x^2\right ) \sqrt{-\frac{2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt{x^2-2}\right )}{3 x \sqrt{x^2-2}}-\frac{2 \left (1-x^2\right ) \sqrt{-\frac{2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\frac{\sqrt{x^2-2}}{2}\right )}{3 x \sqrt{x^2-2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.285672, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {6719, 2056, 571, 83, 63, 203} \[ \frac{\left (1-x^2\right ) \sqrt{-\frac{2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt{x^2-2}\right )}{3 x \sqrt{x^2-2}}-\frac{2 \left (1-x^2\right ) \sqrt{-\frac{2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\frac{\sqrt{x^2-2}}{2}\right )}{3 x \sqrt{x^2-2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6719
Rule 2056
Rule 571
Rule 83
Rule 63
Rule 203
Rubi steps
\begin{align*} \int \frac{\sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}}{2+x^2} \, dx &=\frac{\left (\left (-1+x^2\right ) \sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \int \frac{\sqrt{-2 x^2+x^4}}{\left (-1+x^2\right ) \left (2+x^2\right )} \, dx}{\sqrt{-2 x^2+x^4}}\\ &=\frac{\left (\left (-1+x^2\right ) \sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \int \frac{x \sqrt{-2+x^2}}{\left (-1+x^2\right ) \left (2+x^2\right )} \, dx}{x \sqrt{-2+x^2}}\\ &=\frac{\left (\left (-1+x^2\right ) \sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \operatorname{Subst}\left (\int \frac{\sqrt{-2+x}}{(-1+x) (2+x)} \, dx,x,x^2\right )}{2 x \sqrt{-2+x^2}}\\ &=-\frac{\left (\left (-1+x^2\right ) \sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{-2+x} (-1+x)} \, dx,x,x^2\right )}{6 x \sqrt{-2+x^2}}+\frac{\left (2 \left (-1+x^2\right ) \sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{-2+x} (2+x)} \, dx,x,x^2\right )}{3 x \sqrt{-2+x^2}}\\ &=-\frac{\left (\left (-1+x^2\right ) \sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sqrt{-2+x^2}\right )}{3 x \sqrt{-2+x^2}}+\frac{\left (4 \left (-1+x^2\right ) \sqrt{\frac{-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \operatorname{Subst}\left (\int \frac{1}{4+x^2} \, dx,x,\sqrt{-2+x^2}\right )}{3 x \sqrt{-2+x^2}}\\ &=-\frac{2 \left (1-x^2\right ) \sqrt{-\frac{2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\frac{1}{2} \sqrt{-2+x^2}\right )}{3 x \sqrt{-2+x^2}}+\frac{\left (1-x^2\right ) \sqrt{-\frac{2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt{-2+x^2}\right )}{3 x \sqrt{-2+x^2}}\\ \end{align*}
Mathematica [A] time = 0.0202175, size = 70, normalized size = 0.57 \[ \frac{\sqrt{\frac{x^2 \left (x^2-2\right )}{\left (x^2-1\right )^2}} \left (x^2-1\right ) \left (2 \tan ^{-1}\left (\frac{\sqrt{x^2-2}}{2}\right )-\tan ^{-1}\left (\sqrt{x^2-2}\right )\right )}{3 x \sqrt{x^2-2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 75, normalized size = 0.6 \begin{align*} -{\frac{{x}^{2}-1}{6\,x}\sqrt{{\frac{{x}^{2} \left ({x}^{2}-2 \right ) }{ \left ({x}^{2}-1 \right ) ^{2}}}} \left ( \arctan \left ({(-2+x){\frac{1}{\sqrt{{x}^{2}-2}}}} \right ) -4\,\arctan \left ( 1/2\,\sqrt{{x}^{2}-2} \right ) -\arctan \left ({(2+x){\frac{1}{\sqrt{{x}^{2}-2}}}} \right ) \right ){\frac{1}{\sqrt{{x}^{2}-2}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{\frac{x^{4} - 2 \, x^{2}}{{\left (x^{2} - 1\right )}^{2}}}}{x^{2} + 2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.52951, size = 178, normalized size = 1.45 \begin{align*} -\frac{1}{3} \, \arctan \left (\frac{{\left (x^{2} - 1\right )} \sqrt{\frac{x^{4} - 2 \, x^{2}}{x^{4} - 2 \, x^{2} + 1}}}{x}\right ) + \frac{2}{3} \, \arctan \left (\frac{{\left (x^{2} - 1\right )} \sqrt{\frac{x^{4} - 2 \, x^{2}}{x^{4} - 2 \, x^{2} + 1}}}{2 \, x}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11271, size = 45, normalized size = 0.37 \begin{align*} \frac{1}{3} \,{\left (2 \, \arctan \left (\frac{1}{2} \, \sqrt{x^{2} - 2}\right ) - \arctan \left (\sqrt{x^{2} - 2}\right )\right )} \mathrm{sgn}\left (x^{3} - x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]