Optimal. Leaf size=42 \[ \sin ^{-1}(x)-\frac {\tan ^{-1}\left (\frac {1+4 x \sqrt {1-x^2}}{\sqrt {3} \left (1-2 x^2\right )}\right )}{\sqrt {3}} \]
________________________________________________________________________________________
Rubi [C] time = 0.41, antiderivative size = 122, normalized size of antiderivative = 2.90, number of steps used = 12, number of rules used = 9, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {6742, 1107, 618, 204, 1293, 216, 1174, 377, 205} \begin {gather*} -\frac {\tan ^{-1}\left (\frac {1-2 x^2}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {\tan ^{-1}\left (\frac {x}{\sqrt {-\frac {-\sqrt {3}+i}{\sqrt {3}+i}} \sqrt {1-x^2}}\right )}{\sqrt {3}}-\frac {\tan ^{-1}\left (\frac {\sqrt {-\frac {-\sqrt {3}+i}{\sqrt {3}+i}} x}{\sqrt {1-x^2}}\right )}{\sqrt {3}}+\sin ^{-1}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 205
Rule 216
Rule 377
Rule 618
Rule 1107
Rule 1174
Rule 1293
Rule 6742
Rubi steps
\begin {align*} \int \frac {1}{\frac {1}{x}+\sqrt {1-x^2}} \, dx &=\int \left (\frac {x}{1-x^2+x^4}-\frac {x^2 \sqrt {1-x^2}}{1-x^2+x^4}\right ) \, dx\\ &=\int \frac {x}{1-x^2+x^4} \, dx-\int \frac {x^2 \sqrt {1-x^2}}{1-x^2+x^4} \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,x^2\right )+\int \frac {1}{\sqrt {1-x^2}} \, dx-\int \frac {1}{\sqrt {1-x^2} \left (1-x^2+x^4\right )} \, dx\\ &=\sin ^{-1}(x)+\frac {(2 i) \int \frac {1}{\sqrt {1-x^2} \left (-1-i \sqrt {3}+2 x^2\right )} \, dx}{\sqrt {3}}-\frac {(2 i) \int \frac {1}{\sqrt {1-x^2} \left (-1+i \sqrt {3}+2 x^2\right )} \, dx}{\sqrt {3}}-\operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x^2\right )\\ &=\sin ^{-1}(x)+\frac {\tan ^{-1}\left (\frac {-1+2 x^2}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {(2 i) \operatorname {Subst}\left (\int \frac {1}{-1+i \sqrt {3}-\left (-1-i \sqrt {3}\right ) x^2} \, dx,x,\frac {x}{\sqrt {1-x^2}}\right )}{\sqrt {3}}+\frac {(2 i) \operatorname {Subst}\left (\int \frac {1}{-1-i \sqrt {3}-\left (-1+i \sqrt {3}\right ) x^2} \, dx,x,\frac {x}{\sqrt {1-x^2}}\right )}{\sqrt {3}}\\ &=\sin ^{-1}(x)-\frac {\tan ^{-1}\left (\frac {x}{\sqrt {-\frac {i-\sqrt {3}}{i+\sqrt {3}}} \sqrt {1-x^2}}\right )}{\sqrt {3}}-\frac {\tan ^{-1}\left (\frac {\sqrt {-\frac {i-\sqrt {3}}{i+\sqrt {3}}} x}{\sqrt {1-x^2}}\right )}{\sqrt {3}}+\frac {\tan ^{-1}\left (\frac {-1+2 x^2}{\sqrt {3}}\right )}{\sqrt {3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 3.96, size = 1932, normalized size = 46.00
result too large to display
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [C] time = 0.33, size = 74, normalized size = 1.76 \begin {gather*} i \log \left (\sqrt {1-x^2}-i x\right )+\frac {2 i \tanh ^{-1}\left (-\frac {2 i x^2}{\sqrt {3}}+\frac {2 \sqrt {1-x^2} x}{\sqrt {3}}+\frac {2+i}{\sqrt {3}}\right )}{\sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 73, normalized size = 1.74 \begin {gather*} \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x^{2} - 1\right )}\right ) + \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (2 \, x^{2} - 1\right )} \sqrt {-x^{2} + 1}}{3 \, {\left (x^{3} - x\right )}}\right ) - 2 \, \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.42, size = 193, normalized size = 4.60 \begin {gather*} \frac {1}{2} \, \pi \mathrm {sgn}\relax (x) - \frac {1}{6} \, \sqrt {3} {\left (\pi \mathrm {sgn}\relax (x) + 2 \, \arctan \left (-\frac {\sqrt {3} x {\left (\frac {\sqrt {-x^{2} + 1} - 1}{x} + \frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{3 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right )\right )} - \frac {1}{6} \, \sqrt {3} {\left (\pi \mathrm {sgn}\relax (x) + 2 \, \arctan \left (\frac {\sqrt {3} x {\left (\frac {\sqrt {-x^{2} + 1} - 1}{x} - \frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + 1\right )}}{3 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right )\right )} + \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x^{2} - 1\right )}\right ) + \arctan \left (-\frac {x {\left (\frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.04, size = 234, normalized size = 5.57 \begin {gather*} -2 \arctan \left (\frac {-1+\sqrt {-x^{2}+1}}{x}\right )+\frac {\sqrt {3}\, \arctan \left (\frac {\left (2 x^{2}-1\right ) \sqrt {3}}{3}\right )}{3}-\frac {i \sqrt {3}\, \ln \left (\frac {\left (-1-i \sqrt {3}\right ) \left (-1+\sqrt {-x^{2}+1}\right )}{x}+\frac {\left (-1+\sqrt {-x^{2}+1}\right )^{2}}{x^{2}}-1\right )}{6}-\frac {i \sqrt {3}\, \ln \left (\frac {\left (1-i \sqrt {3}\right ) \left (-1+\sqrt {-x^{2}+1}\right )}{x}+\frac {\left (-1+\sqrt {-x^{2}+1}\right )^{2}}{x^{2}}-1\right )}{6}+\frac {i \sqrt {3}\, \ln \left (\frac {\left (1+i \sqrt {3}\right ) \left (-1+\sqrt {-x^{2}+1}\right )}{x}+\frac {\left (-1+\sqrt {-x^{2}+1}\right )^{2}}{x^{2}}-1\right )}{6}+\frac {i \sqrt {3}\, \ln \left (\frac {\left (i \sqrt {3}-1\right ) \left (-1+\sqrt {-x^{2}+1}\right )}{x}+\frac {\left (-1+\sqrt {-x^{2}+1}\right )^{2}}{x^{2}}-1\right )}{6} \end {gather*}
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*} \int \frac {1}{\sqrt {-x^{2} + 1} + \frac {1}{x}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.92, size = 549, normalized size = 13.07 \begin {gather*} \mathrm {asin}\relax (x)-\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )-1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}}-\sqrt {1-x^2}\,1{}\mathrm {i}}{\frac {\sqrt {3}}{2}-x+\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}+\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )-1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}-\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )+1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}-\frac {\ln \left (x-\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}{\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}}-\frac {\ln \left (x+\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}{\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}}+\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )+1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}+\frac {\ln \left (x-\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}{-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}}+\frac {\ln \left (x+\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}{-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}} \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 {x}{x \sqrt {1 - x^{2}} + 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________