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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.101555, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 9, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {12, 1023, 634, 618, 204, 628, 635, 203, 260} \[ \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 ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1023
Rule 634
Rule 618
Rule 204
Rule 628
Rule 635
Rule 203
Rule 260
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.414437, size = 187, normalized size = 1.73 \[ \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 ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.026, size = 370, normalized size = 3.4 \begin{align*}{\frac{\arcsin \left ( 2+x \right ) }{2}}-{\frac{\sqrt{3}\sqrt{4}}{12}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12} \left ( \sqrt{2}\arctan \left ({\frac{\sqrt{2}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}} \right ) -{\it Artanh} \left ( 3\,{\frac{x}{-3/2-x}{\frac{1}{\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}}}} \right ) \right ){\frac{1}{\sqrt{{ \left ({{x}^{2} \left ( -{\frac{3}{2}}-x \right ) ^{-2}}-4 \right ) \left ({x \left ( -{\frac{3}{2}}-x \right ) ^{-1}}+1 \right ) ^{-2}}}}} \left ({x \left ( -{\frac{3}{2}}-x \right ) ^{-1}}+1 \right ) ^{-1}}+{\frac{\sqrt{3}\sqrt{4}\sqrt{2}}{3}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}\arctan \left ({\frac{\sqrt{2}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}} \right ){\frac{1}{\sqrt{{ \left ({{x}^{2} \left ( -{\frac{3}{2}}-x \right ) ^{-2}}-4 \right ) \left ({x \left ( -{\frac{3}{2}}-x \right ) ^{-1}}+1 \right ) ^{-2}}}}} \left ({x \left ( -{\frac{3}{2}}-x \right ) ^{-1}}+1 \right ) ^{-1}}-{\frac{\sqrt{3}\sqrt{4}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12} \left ( \sqrt{2}\arctan \left ({\frac{\sqrt{2}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}} \right ) +{\it Artanh} \left ( 3\,{\frac{x}{-3/2-x}{\frac{1}{\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}}}} \right ) \right ){\frac{1}{\sqrt{{ \left ({{x}^{2} \left ( -{\frac{3}{2}}-x \right ) ^{-2}}-4 \right ) \left ({x \left ( -{\frac{3}{2}}-x \right ) ^{-1}}+1 \right ) ^{-2}}}}} \left ({x \left ( -{\frac{3}{2}}-x \right ) ^{-1}}+1 \right ) ^{-1}}+{\frac{\ln \left ( 2\,{x}^{2}+4\,x+3 \right ) }{4}}-{\frac{\sqrt{2}}{2}\arctan \left ({\frac{ \left ( 4\,x+4 \right ) \sqrt{2}}{4}} \right ) } \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} - 4 \, x - 3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.82082, size = 529, normalized size = 4.9 \begin{align*} -\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{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} - 4 x - 3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.14987, size = 266, normalized size = 2.46 \begin{align*} -\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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]