Optimal. Leaf size=47 \[ \frac {\left (1-x^2\right ) \sqrt {1-\frac {1}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt {x^2-2}\right )}{x \sqrt {x^2-2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.46, antiderivative size = 73, normalized size of antiderivative = 1.55, number of steps used = 13, number of rules used = 10, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6722, 6725, 1990, 1146, 21, 261, 444, 50, 63, 203} \[ \frac {\left (1-x^2\right ) \sqrt {x^4-2 x^2} \sqrt {1-\frac {1}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt {x^2-2}\right )}{x \sqrt {x^2-2} \sqrt {\left (x^2-1\right )^2-1}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 50
Rule 63
Rule 203
Rule 261
Rule 444
Rule 1146
Rule 1990
Rule 6722
Rule 6725
Rubi steps
\begin {align*} \int \frac {\sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}}{2-x^2} \, dx &=\frac {\left (\left (-1+x^2\right ) \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {\sqrt {-1+\left (-1+x^2\right )^2}}{\left (2-x^2\right ) \left (-1+x^2\right )} \, dx}{\sqrt {-1+\left (-1+x^2\right )^2}}\\ &=\frac {\left (\left (-1+x^2\right ) \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \left (\frac {\sqrt {-1+\left (-1+x^2\right )^2}}{2-x^2}+\frac {\sqrt {-1+\left (-1+x^2\right )^2}}{-1+x^2}\right ) \, dx}{\sqrt {-1+\left (-1+x^2\right )^2}}\\ &=\frac {\left (\left (-1+x^2\right ) \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {\sqrt {-1+\left (-1+x^2\right )^2}}{2-x^2} \, dx}{\sqrt {-1+\left (-1+x^2\right )^2}}+\frac {\left (\left (-1+x^2\right ) \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {\sqrt {-1+\left (-1+x^2\right )^2}}{-1+x^2} \, dx}{\sqrt {-1+\left (-1+x^2\right )^2}}\\ &=\frac {\left (\left (-1+x^2\right ) \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {\sqrt {-2 x^2+x^4}}{2-x^2} \, dx}{\sqrt {-1+\left (-1+x^2\right )^2}}+\frac {\left (\left (-1+x^2\right ) \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {\sqrt {-2 x^2+x^4}}{-1+x^2} \, dx}{\sqrt {-1+\left (-1+x^2\right )^2}}\\ &=\frac {\left (\left (-1+x^2\right ) \sqrt {-2 x^2+x^4} \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {x \sqrt {-2+x^2}}{2-x^2} \, dx}{x \sqrt {-2+x^2} \sqrt {-1+\left (-1+x^2\right )^2}}+\frac {\left (\left (-1+x^2\right ) \sqrt {-2 x^2+x^4} \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {x \sqrt {-2+x^2}}{-1+x^2} \, dx}{x \sqrt {-2+x^2} \sqrt {-1+\left (-1+x^2\right )^2}}\\ &=\frac {\left (\left (-1+x^2\right ) \sqrt {-2 x^2+x^4} \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {-2+x}}{-1+x} \, dx,x,x^2\right )}{2 x \sqrt {-2+x^2} \sqrt {-1+\left (-1+x^2\right )^2}}-\frac {\left (\left (-1+x^2\right ) \sqrt {-2 x^2+x^4} \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \int \frac {x}{\sqrt {-2+x^2}} \, dx}{x \sqrt {-2+x^2} \sqrt {-1+\left (-1+x^2\right )^2}}\\ &=-\frac {\left (\left (-1+x^2\right ) \sqrt {-2 x^2+x^4} \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-2+x} (-1+x)} \, dx,x,x^2\right )}{2 x \sqrt {-2+x^2} \sqrt {-1+\left (-1+x^2\right )^2}}\\ &=-\frac {\left (\left (-1+x^2\right ) \sqrt {-2 x^2+x^4} \sqrt {1-\frac {1}{\left (-1+x^2\right )^2}}\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {-2+x^2}\right )}{x \sqrt {-2+x^2} \sqrt {-1+\left (-1+x^2\right )^2}}\\ &=\frac {\left (1-x^2\right ) \sqrt {-2 x^2+x^4} \sqrt {1-\frac {1}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt {-2+x^2}\right )}{x \sqrt {-2+x^2} \sqrt {-1+\left (-1+x^2\right )^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 91, normalized size = 1.94 \[ \frac {1}{2} \tan ^{-1}\left (\frac {(x-1) (x+1) (x+2) \sqrt {\frac {x^2 \left (x^2-2\right )}{\left (x^2-1\right )^2}}}{x \left (x^2-2\right )}\right )-\frac {1}{2} \tan ^{-1}\left (\frac {(x-2) (x-1) (x+1) \sqrt {\frac {x^2 \left (x^2-2\right )}{\left (x^2-1\right )^2}}}{x \left (x^2-2\right )}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 36, normalized size = 0.77 \[ -\arctan \left (\frac {{\left (x^{2} - 1\right )} \sqrt {\frac {x^{4} - 2 \, x^{2}}{x^{4} - 2 \, x^{2} + 1}}}{x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.34, size = 18, normalized size = 0.38 \[ -\arctan \left (\sqrt {x^{2} - 2}\right ) \mathrm {sgn}\left (x^{3} - x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 63, normalized size = 1.34 \[ -\frac {\sqrt {\frac {\left (x^{2}-2\right ) x^{2}}{\left (x^{2}-1\right )^{2}}}\, \left (x^{2}-1\right ) \left (\arctan \left (\frac {x -2}{\sqrt {x^{2}-2}}\right )-\arctan \left (\frac {x +2}{\sqrt {x^{2}-2}}\right )\right )}{2 \sqrt {x^{2}-2}\, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\int \frac {\sqrt {-\frac {1}{{\left (x^{2} - 1\right )}^{2}} + 1}}{x^{2} - 2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int -\frac {\sqrt {1-\frac {1}{{\left (x^2-1\right )}^2}}}{x^2-2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \int \frac {\sqrt {\frac {x^{4}}{x^{4} - 2 x^{2} + 1} - \frac {2 x^{2}}{x^{4} - 2 x^{2} + 1}}}{x^{2} - 2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________