Optimal. Leaf size=26 \[ \frac {2 \sqrt {1-x^2}}{x}+\frac {2}{x}+2 \sin ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {6688, 6742, 277, 216} \[ \frac {2 \sqrt {1-x^2}}{x}+\frac {2}{x}+2 \sin ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 216
Rule 277
Rule 6688
Rule 6742
Rubi steps
\begin {align*} \int \frac {\left (-\sqrt {1-x}-\sqrt {1+x}\right ) \left (\sqrt {1-x}+\sqrt {1+x}\right )}{x^2} \, dx &=-\int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx\\ &=-\int \left (\frac {2}{x^2}+\frac {2 \sqrt {1-x^2}}{x^2}\right ) \, dx\\ &=\frac {2}{x}-2 \int \frac {\sqrt {1-x^2}}{x^2} \, dx\\ &=\frac {2}{x}+\frac {2 \sqrt {1-x^2}}{x}+2 \int \frac {1}{\sqrt {1-x^2}} \, dx\\ &=\frac {2}{x}+\frac {2 \sqrt {1-x^2}}{x}+2 \sin ^{-1}(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 22, normalized size = 0.85 \[ \frac {2 \left (\sqrt {1-x^2}+x \sin ^{-1}(x)+1\right )}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 44, normalized size = 1.69 \[ -\frac {2 \, {\left (2 \, x \arctan \left (\frac {\sqrt {x + 1} \sqrt {-x + 1} - 1}{x}\right ) - \sqrt {x + 1} \sqrt {-x + 1} - 1\right )}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.46, size = 149, normalized size = 5.73 \[ 2 \, \pi + \frac {8 \, {\left (\frac {\sqrt {2} - \sqrt {-x + 1}}{\sqrt {x + 1}} - \frac {\sqrt {x + 1}}{\sqrt {2} - \sqrt {-x + 1}}\right )}}{{\left (\frac {\sqrt {2} - \sqrt {-x + 1}}{\sqrt {x + 1}} - \frac {\sqrt {x + 1}}{\sqrt {2} - \sqrt {-x + 1}}\right )}^{2} - 4} + \frac {2}{x} + 4 \, \arctan \left (\frac {\sqrt {x + 1} {\left (\frac {{\left (\sqrt {2} - \sqrt {-x + 1}\right )}^{2}}{x + 1} - 1\right )}}{2 \, {\left (\sqrt {2} - \sqrt {-x + 1}\right )}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 50, normalized size = 1.92 \[ \frac {2}{x}-\frac {2 \left (-x \arcsin \relax (x )-\sqrt {-x^{2}+1}\right ) \sqrt {x +1}\, \sqrt {-x +1}}{\sqrt {-x^{2}+1}\, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.90, size = 24, normalized size = 0.92 \[ \frac {2 \, \sqrt {-x^{2} + 1}}{x} + \frac {2}{x} + 2 \, \arcsin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.79, size = 118, normalized size = 4.54 \[ \frac {\frac {5\,{\left (\sqrt {1-x}-1\right )}^2}{2\,{\left (\sqrt {x+1}-1\right )}^2}-\frac {1}{2}}{\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}-\frac {{\left (\sqrt {1-x}-1\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}}-8\,\mathrm {atan}\left (\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}\right )+\frac {\sqrt {1-x}-1}{2\,\left (\sqrt {x+1}-1\right )}+\frac {2}{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 {2}{x^{2}}\, dx - \int \frac {2 \sqrt {1 - x} \sqrt {x + 1}}{x^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________