Optimal. Leaf size=108 \[ \frac {1}{2} \log (x+3)+\frac {1}{2} \log \left (\frac {\sqrt {-x-1} x+\sqrt {x+3} x+3 \sqrt {-x-1}}{(x+3)^{3/2}}\right )-\tan ^{-1}\left (\frac {\sqrt {-x-1}}{\sqrt {x+3}}\right )-\sqrt {2} \tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-x-1}}{\sqrt {x+3}}}{\sqrt {2}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {12, 1023, 634, 618, 204, 628, 635, 203, 260} \begin {gather*} \frac {1}{2} \log (x+3)+\frac {1}{2} \log \left (\frac {\sqrt {-x-1} x+\sqrt {x+3} x+3 \sqrt {-x-1}}{(x+3)^{3/2}}\right )-\tan ^{-1}\left (\frac {\sqrt {-x-1}}{\sqrt {x+3}}\right )-\sqrt {2} \tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-x-1}}{\sqrt {x+3}}}{\sqrt {2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 203
Rule 204
Rule 260
Rule 618
Rule 628
Rule 634
Rule 635
Rule 1023
Rubi steps
\begin {align*} \int \frac {1}{x+\sqrt {-3-4 x-x^2}} \, dx &=2 \operatorname {Subst}\left (\int \frac {2 x}{\left (1+x^2\right ) \left (1-2 x+3 x^2\right )} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=4 \operatorname {Subst}\left (\int \frac {x}{\left (1+x^2\right ) \left (1-2 x+3 x^2\right )} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {-2-2 x}{1+x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {2+6 x}{1-2 x+3 x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {-2+6 x}{1-2 x+3 x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )+2 \operatorname {Subst}\left (\int \frac {1}{1-2 x+3 x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )-\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )-\operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=-\tan ^{-1}\left (\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )+\frac {1}{2} \log (3+x)+\frac {1}{2} \log \left (\frac {3 \sqrt {-1-x}+\sqrt {-1-x} x+x \sqrt {3+x}}{(3+x)^{3/2}}\right )-4 \operatorname {Subst}\left (\int \frac {1}{-8-x^2} \, dx,x,-2+\frac {6 \sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=-\tan ^{-1}\left (\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )-\sqrt {2} \tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-1-x}}{\sqrt {3+x}}}{\sqrt {2}}\right )+\frac {1}{2} \log (3+x)+\frac {1}{2} \log \left (\frac {3 \sqrt {-1-x}+\sqrt {-1-x} x+x \sqrt {3+x}}{(3+x)^{3/2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.42, size = 187, normalized size = 1.73 \begin {gather*} \frac {1}{4} \left (\log \left (2 x^2+4 x+3\right )+i \sqrt {1-2 i \sqrt {2}} \tanh ^{-1}\left (\frac {i \sqrt {2} x+2 x+2 i \sqrt {2}+2}{\sqrt {2-4 i \sqrt {2}} \sqrt {-x^2-4 x-3}}\right )-i \sqrt {1+2 i \sqrt {2}} \tanh ^{-1}\left (\frac {\left (2-i \sqrt {2}\right ) x-2 i \sqrt {2}+2}{\sqrt {2+4 i \sqrt {2}} \sqrt {-x^2-4 x-3}}\right )+2 \sin ^{-1}(x+2)-2 \sqrt {2} \tan ^{-1}\left (\sqrt {2} (x+1)\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.34, size = 86, normalized size = 0.80 \begin {gather*} \frac {1}{2} \log \left (\sqrt {-x^2-4 x-3}+x\right )-\tan ^{-1}\left (\frac {\sqrt {-x^2-4 x-3}}{x+3}\right )-\sqrt {2} \tan ^{-1}\left (\frac {\sqrt {2} x+\sqrt {2}}{\sqrt {-x^2-4 x-3}+x+1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.63, size = 187, normalized size = 1.73 \begin {gather*} -\frac {1}{2} \, \sqrt {2} \arctan \left (\sqrt {2} {\left (x + 1\right )}\right ) + \frac {1}{4} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} x + 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) + \frac {1}{4} \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} x - 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) - \frac {1}{2} \, \arctan \left (\frac {\sqrt {-x^{2} - 4 \, x - 3} {\left (x + 2\right )}}{x^{2} + 4 \, x + 3}\right ) + \frac {1}{4} \, \log \left (2 \, x^{2} + 4 \, x + 3\right ) - \frac {1}{8} \, \log \left (-\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) + \frac {1}{8} \, \log \left (\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.45, size = 197, normalized size = 1.82 \begin {gather*} -\frac {1}{2} \, \sqrt {2} \arctan \left (\sqrt {2} {\left (x + 1\right )}\right ) + \frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) + \frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {\sqrt {-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac {1}{2} \, \arcsin \left (x + 2\right ) + \frac {1}{4} \, \log \left (2 \, x^{2} + 4 \, x + 3\right ) + \frac {1}{4} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) - \frac {1}{4} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {{\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.03, size = 370, normalized size = 3.43 \begin {gather*} \frac {\arcsin \left (x +2\right )}{2}-\frac {\sqrt {2}\, \arctan \left (\frac {\left (4 x +4\right ) \sqrt {2}}{4}\right )}{2}+\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \sqrt {2}}{6}\right )}{3 \sqrt {\frac {\frac {x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-4}{\left (\frac {x}{-x -\frac {3}{2}}+1\right )^{2}}}\, \left (\frac {x}{-x -\frac {3}{2}}+1\right )}+\frac {\ln \left (2 x^{2}+4 x +3\right )}{4}-\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \left (-\arctanh \left (\frac {3 x}{\left (-x -\frac {3}{2}\right ) \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}}\right )+\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \sqrt {2}}{6}\right )\right )}{12 \sqrt {\frac {\frac {x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-4}{\left (\frac {x}{-x -\frac {3}{2}}+1\right )^{2}}}\, \left (\frac {x}{-x -\frac {3}{2}}+1\right )}-\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \left (\arctanh \left (\frac {3 x}{\left (-x -\frac {3}{2}\right ) \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}}\right )+\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \sqrt {2}}{6}\right )\right )}{6 \sqrt {\frac {\frac {x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-4}{\left (\frac {x}{-x -\frac {3}{2}}+1\right )^{2}}}\, \left (\frac {x}{-x -\frac {3}{2}}+1\right )} \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}{x + \sqrt {-x^{2} - 4 \, x - 3}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{x+\sqrt {-x^2-4\,x-3}} \,d x \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 {1}{x + \sqrt {- x^{2} - 4 x - 3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________