Optimal. Leaf size=180 \[ -\frac{1}{2} \log \left (-\frac{-\sqrt{3} \sqrt{-x^2-2 x+3}-x+3}{x^2}\right )+\frac{1}{14} \left (7+\sqrt{7}\right ) \log \left (-\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-\sqrt{7}+\sqrt{3}+1\right )+\frac{1}{14} \left (7-\sqrt{7}\right ) \log \left (-\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}+\sqrt{7}+\sqrt{3}+1\right )+\tan ^{-1}\left (\frac{\sqrt{3}-\sqrt{-x^2-2 x+3}}{x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.195066, antiderivative size = 180, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {1074, 632, 31, 635, 203, 260} \[ -\frac{1}{2} \log \left (-\frac{-\sqrt{3} \sqrt{-x^2-2 x+3}-x+3}{x^2}\right )+\frac{1}{14} \left (7+\sqrt{7}\right ) \log \left (-\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-\sqrt{7}+\sqrt{3}+1\right )+\frac{1}{14} \left (7-\sqrt{7}\right ) \log \left (-\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}+\sqrt{7}+\sqrt{3}+1\right )+\tan ^{-1}\left (\frac{\sqrt{3}-\sqrt{-x^2-2 x+3}}{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1074
Rule 632
Rule 31
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \frac{1}{x+\sqrt{3-2 x-x^2}} \, dx &=2 \operatorname{Subst}\left (\int \frac{\sqrt{3}-2 x-\sqrt{3} x^2}{\left (1+x^2\right ) \left (2-\sqrt{3}+2 \left (1+\sqrt{3}\right ) x+\sqrt{3} x^2\right )} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\\ &=\frac{1}{16} \operatorname{Subst}\left (\int \frac{-6+2 \sqrt{3} \left (2-\sqrt{3}\right )-4 \left (1+\sqrt{3}\right )-\left (-2 \sqrt{3}+2 \left (2-\sqrt{3}\right )+4 \sqrt{3} \left (1+\sqrt{3}\right )\right ) x}{1+x^2} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )+\frac{1}{16} \operatorname{Subst}\left (\int \frac{3 \sqrt{3}-\sqrt{3} \left (2-\sqrt{3}\right )^2+4 \left (2-\sqrt{3}\right ) \left (1+\sqrt{3}\right )+4 \sqrt{3} \left (1+\sqrt{3}\right )^2+\sqrt{3} \left (-2 \sqrt{3}+2 \left (2-\sqrt{3}\right )+4 \sqrt{3} \left (1+\sqrt{3}\right )\right ) x}{2-\sqrt{3}+2 \left (1+\sqrt{3}\right ) x+\sqrt{3} x^2} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\\ &=-\left (\frac{1}{2} \left (\sqrt{\frac{3}{7}} \left (1-\sqrt{7}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{3}+\sqrt{7}+\sqrt{3} x} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\right )+\frac{1}{2} \left (\sqrt{\frac{3}{7}} \left (1+\sqrt{7}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{3}-\sqrt{7}+\sqrt{3} x} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )-\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )-\operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\\ &=-\tan ^{-1}\left (\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )-\frac{1}{2} \log \left (\frac{-3+x+\sqrt{3} \sqrt{3-2 x-x^2}}{x^2}\right )+\frac{1}{14} \left (7+\sqrt{7}\right ) \log \left (1+\sqrt{3}-\sqrt{7}-\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )+\frac{1}{14} \left (7-\sqrt{7}\right ) \log \left (1+\sqrt{3}+\sqrt{7}-\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )\\ \end{align*}
Mathematica [A] time = 0.388879, size = 197, normalized size = 1.09 \[ \frac{1}{28} \left (-\sqrt{14 \left (4+\sqrt{7}\right )} \tanh ^{-1}\left (\frac{\left (\sqrt{7}-1\right ) x+\sqrt{7}+7}{\sqrt{2 \left (4+\sqrt{7}\right )} \sqrt{-x^2-2 x+3}}\right )-\sqrt{56-14 \sqrt{7}} \tanh ^{-1}\left (\frac{\sqrt{7} x+x+\sqrt{7}-7}{\sqrt{2} \sqrt{\left (\sqrt{7}-4\right ) \left (x^2+2 x-3\right )}}\right )-\sqrt{7} \log \left (2 x-\sqrt{7}+1\right )+7 \log \left (2 x-\sqrt{7}+1\right )+\sqrt{7} \log \left (2 x+\sqrt{7}+1\right )+7 \log \left (2 x+\sqrt{7}+1\right )+14 \sin ^{-1}\left (\frac{x+1}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.059, size = 551, normalized size = 3.1 \begin{align*} \text{result too large to display} \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{1}{x + \sqrt{-x^{2} - 2 \, x + 3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.84741, size = 972, normalized size = 5.4 \begin{align*} \frac{1}{56} \, \sqrt{7} \log \left (\frac{24 \, x^{4} + 62 \, x^{3} - 153 \, x^{2} + 2 \, \sqrt{7}{\left (3 \, x^{4} + x^{3} - 45 \, x^{2} + 45 \, x\right )} -{\left (14 \, x^{3} - 84 \, x^{2} + \sqrt{7}{\left (8 \, x^{3} - 30 \, x^{2} + 27 \, x - 27\right )} + 126 \, x\right )} \sqrt{-x^{2} - 2 \, x + 3} + 180 \, x - 135}{4 \, x^{4} + 8 \, x^{3} - 8 \, x^{2} - 12 \, x + 9}\right ) + \frac{1}{56} \, \sqrt{7} \log \left (\frac{24 \, x^{4} + 62 \, x^{3} - 153 \, x^{2} - 2 \, \sqrt{7}{\left (3 \, x^{4} + x^{3} - 45 \, x^{2} + 45 \, x\right )} +{\left (14 \, x^{3} - 84 \, x^{2} - \sqrt{7}{\left (8 \, x^{3} - 30 \, x^{2} + 27 \, x - 27\right )} + 126 \, x\right )} \sqrt{-x^{2} - 2 \, x + 3} + 180 \, x - 135}{4 \, x^{4} + 8 \, x^{3} - 8 \, x^{2} - 12 \, x + 9}\right ) + \frac{1}{28} \, \sqrt{7} \log \left (\frac{2 \, x^{2} + \sqrt{7}{\left (2 \, x + 1\right )} + 2 \, x + 4}{2 \, x^{2} + 2 \, x - 3}\right ) - \frac{1}{2} \, \arctan \left (\frac{\sqrt{-x^{2} - 2 \, x + 3}{\left (x + 1\right )}}{x^{2} + 2 \, x - 3}\right ) + \frac{1}{4} \, \log \left (2 \, x^{2} + 2 \, x - 3\right ) - \frac{1}{8} \, \log \left (\frac{2 \, \sqrt{-x^{2} - 2 \, x + 3} x + 2 \, x - 3}{x^{2}}\right ) + \frac{1}{8} \, \log \left (-\frac{2 \, \sqrt{-x^{2} - 2 \, x + 3} x - 2 \, x + 3}{x^{2}}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{x + \sqrt{- x^{2} - 2 x + 3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.29647, size = 387, normalized size = 2.15 \begin{align*} -\frac{1}{28} \, \sqrt{7} \log \left (\frac{{\left | 4 \, x - 2 \, \sqrt{7} + 2 \right |}}{{\left | 4 \, x + 2 \, \sqrt{7} + 2 \right |}}\right ) + \frac{1}{28} \, \sqrt{7} \log \left (\frac{{\left | -2 \, \sqrt{7} + \frac{6 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + 4 \right |}}{{\left | 2 \, \sqrt{7} + \frac{6 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + 4 \right |}}\right ) - \frac{1}{28} \, \sqrt{7} \log \left (\frac{{\left | -2 \, \sqrt{7} + \frac{2 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} - 4 \right |}}{{\left | 2 \, \sqrt{7} + \frac{2 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} - 4 \right |}}\right ) + \frac{1}{2} \, \arcsin \left (\frac{1}{2} \, x + \frac{1}{2}\right ) + \frac{1}{4} \, \log \left ({\left | 2 \, x^{2} + 2 \, x - 3 \right |}\right ) + \frac{1}{4} \, \log \left ({\left | \frac{4 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + \frac{3 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{2}}{{\left (x + 1\right )}^{2}} - 1 \right |}\right ) - \frac{1}{4} \, \log \left ({\left | -\frac{4 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + \frac{{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{2}}{{\left (x + 1\right )}^{2}} - 3 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]