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.20, antiderivative size = 180, normalized size of antiderivative = 1.00, 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 31
Rule 203
Rule 260
Rule 632
Rule 635
Rule 1074
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.38, 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]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 372, normalized size = 2.07 \[ \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 ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.52, size = 287, normalized size = 1.59 \[ -\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 ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.07, size = 551, normalized size = 3.06 \[ \frac {\sqrt {7}\, \arctanh \left (\frac {4-\sqrt {7}+\left (-1-\sqrt {7}\right ) \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )}{\left (-\frac {1}{2}+\frac {\sqrt {7}}{2}\right ) \sqrt {-4 \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )^{2}+4 \left (-1-\sqrt {7}\right ) \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )+8-2 \sqrt {7}}}\right )}{-\frac {7}{2}+\frac {7 \sqrt {7}}{2}}-\frac {\arctanh \left (\frac {4-\sqrt {7}+\left (-1-\sqrt {7}\right ) \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )}{\left (-\frac {1}{2}+\frac {\sqrt {7}}{2}\right ) \sqrt {-4 \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )^{2}+4 \left (-1-\sqrt {7}\right ) \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )+8-2 \sqrt {7}}}\right )}{4 \left (-\frac {1}{2}+\frac {\sqrt {7}}{2}\right )}-\frac {\sqrt {7}\, \arctanh \left (\frac {4+\sqrt {7}+\left (-1+\sqrt {7}\right ) \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )}{\left (\frac {1}{2}+\frac {\sqrt {7}}{2}\right ) \sqrt {-4 \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )^{2}+4 \left (-1+\sqrt {7}\right ) \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )+8+2 \sqrt {7}}}\right )}{7 \left (\frac {1}{2}+\frac {\sqrt {7}}{2}\right )}-\frac {\arctanh \left (\frac {4+\sqrt {7}+\left (-1+\sqrt {7}\right ) \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )}{\left (\frac {1}{2}+\frac {\sqrt {7}}{2}\right ) \sqrt {-4 \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )^{2}+4 \left (-1+\sqrt {7}\right ) \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )+8+2 \sqrt {7}}}\right )}{4 \left (\frac {1}{2}+\frac {\sqrt {7}}{2}\right )}+\frac {\sqrt {7}\, \arctanh \left (\frac {\left (4 x +2\right ) \sqrt {7}}{14}\right )}{14}+\frac {\sqrt {7}\, \arcsin \left (\frac {x +1}{\sqrt {2-\frac {\sqrt {7}}{2}+\frac {\left (-1-\sqrt {7}\right )^{2}}{4}}}\right )}{28}+\frac {\arcsin \left (\frac {x +1}{\sqrt {2-\frac {\sqrt {7}}{2}+\frac {\left (-1-\sqrt {7}\right )^{2}}{4}}}\right )}{4}-\frac {\sqrt {7}\, \arcsin \left (\frac {x +1}{\sqrt {2+\frac {\sqrt {7}}{2}+\frac {\left (-1+\sqrt {7}\right )^{2}}{4}}}\right )}{28}+\frac {\arcsin \left (\frac {x +1}{\sqrt {2+\frac {\sqrt {7}}{2}+\frac {\left (-1+\sqrt {7}\right )^{2}}{4}}}\right )}{4}+\frac {\ln \left (2 x^{2}+2 x -3\right )}{4}+\frac {\sqrt {7}\, \sqrt {-4 \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )^{2}+4 \left (-1+\sqrt {7}\right ) \left (x +\frac {1}{2}+\frac {\sqrt {7}}{2}\right )+8+2 \sqrt {7}}}{28}-\frac {\sqrt {7}\, \sqrt {-4 \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )^{2}+4 \left (-1-\sqrt {7}\right ) \left (x +\frac {1}{2}-\frac {\sqrt {7}}{2}\right )+8-2 \sqrt {7}}}{28} \]
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 {1}{x + \sqrt {-x^{2} - 2 \, x + 3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {1}{x+\sqrt {-x^2-2\,x+3}} \,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 {1}{x + \sqrt {- x^{2} - 2 x + 3}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________