Optimal. Leaf size=87 \[ \frac {1-\frac {\sqrt {-x-1}}{\sqrt {x+3}}}{-\frac {3 (x+1)}{x+3}-\frac {2 \sqrt {-x-1}}{\sqrt {x+3}}+1}+\frac {\tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-x-1}}{\sqrt {x+3}}}{\sqrt {2}}\right )}{\sqrt {2}} \]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {12, 638, 618, 204} \begin {gather*} \frac {1-\frac {\sqrt {-x-1}}{\sqrt {x+3}}}{-\frac {3 (x+1)}{x+3}-\frac {2 \sqrt {-x-1}}{\sqrt {x+3}}+1}+\frac {\tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-x-1}}{\sqrt {x+3}}}{\sqrt {2}}\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 618
Rule 638
Rubi steps
\begin {align*} \int \frac {1}{\left (x+\sqrt {-3-4 x-x^2}\right )^2} \, dx &=2 \operatorname {Subst}\left (\int -\frac {2 x}{\left (1-2 x+3 x^2\right )^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=-\left (4 \operatorname {Subst}\left (\int \frac {x}{\left (1-2 x+3 x^2\right )^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\right )\\ &=\frac {1-\frac {\sqrt {-1-x}}{\sqrt {3+x}}}{1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}}-\operatorname {Subst}\left (\int \frac {1}{1-2 x+3 x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=\frac {1-\frac {\sqrt {-1-x}}{\sqrt {3+x}}}{1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}}+2 \operatorname {Subst}\left (\int \frac {1}{-8-x^2} \, dx,x,-2+\frac {6 \sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=\frac {1-\frac {\sqrt {-1-x}}{\sqrt {3+x}}}{1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}}+\frac {\tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-1-x}}{\sqrt {3+x}}}{\sqrt {2}}\right )}{\sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.67, size = 881, normalized size = 10.13 \begin {gather*} \frac {1}{16} \left (\frac {8 (x+3)}{2 x^2+4 x+3}+4 \sqrt {2} \tan ^{-1}\left (\sqrt {2} (x+1)\right )-\frac {2 i \left (-2 i+\sqrt {2}\right ) \tan ^{-1}\left (\frac {(x+2) \left (2 \left (9+2 i \sqrt {2}\right ) x^2+16 \left (2+i \sqrt {2}\right ) x+3 \left (5+4 i \sqrt {2}\right )\right )}{\left (8 i+6 \sqrt {2}\right ) x^3+\left (-6 \sqrt {1+2 i \sqrt {2}} \sqrt {-x^2-4 x-3}+8 \sqrt {2}+36 i\right ) x^2+\left (-12 \sqrt {1+2 i \sqrt {2}} \sqrt {-x^2-4 x-3}-5 \sqrt {2}+40 i\right ) x-9 \sqrt {1+2 i \sqrt {2}} \sqrt {-x^2-4 x-3}-6 \sqrt {2}+12 i}\right )}{\sqrt {1+2 i \sqrt {2}}}+\frac {2 \left (2 i+\sqrt {2}\right ) \tanh ^{-1}\left (\frac {(x+2) \left (2 \left (9 i+2 \sqrt {2}\right ) x^2+16 \left (2 i+\sqrt {2}\right ) x+3 \left (5 i+4 \sqrt {2}\right )\right )}{\left (-8 i+6 \sqrt {2}\right ) x^3+\left (-6 \sqrt {1-2 i \sqrt {2}} \sqrt {-x^2-4 x-3}+8 \sqrt {2}-36 i\right ) x^2-12 \sqrt {1-2 i \sqrt {2}} \sqrt {-x^2-4 x-3} x-5 \left (8 i+\sqrt {2}\right ) x-3 \left (3 \sqrt {1-2 i \sqrt {2}} \sqrt {-x^2-4 x-3}+2 \sqrt {2}+4 i\right )}\right )}{\sqrt {1-2 i \sqrt {2}}}-\frac {\left (2 i+\sqrt {2}\right ) \log \left (4 \left (2 x^2+4 x+3\right )^2\right )}{\sqrt {1-2 i \sqrt {2}}}-\frac {\left (-2 i+\sqrt {2}\right ) \log \left (4 \left (2 x^2+4 x+3\right )^2\right )}{\sqrt {1+2 i \sqrt {2}}}+\frac {\left (2 i+\sqrt {2}\right ) \log \left (\left (2 x^2+4 x+3\right ) \left (\left (2+2 i \sqrt {2}\right ) x^2+\left (-2 \sqrt {2-4 i \sqrt {2}} \sqrt {-x^2-4 x-3}+8 i \sqrt {2}+4\right ) x-2 \sqrt {2-4 i \sqrt {2}} \sqrt {-x^2-4 x-3}+6 i \sqrt {2}+3\right )\right )}{\sqrt {1-2 i \sqrt {2}}}+\frac {\left (-2 i+\sqrt {2}\right ) \log \left (\left (2 x^2+4 x+3\right ) \left (\left (2-2 i \sqrt {2}\right ) x^2-2 \left (\sqrt {2+4 i \sqrt {2}} \sqrt {-x^2-4 x-3}+4 i \sqrt {2}-2\right ) x-2 \sqrt {2+4 i \sqrt {2}} \sqrt {-x^2-4 x-3}-6 i \sqrt {2}+3\right )\right )}{\sqrt {1+2 i \sqrt {2}}}+\frac {8 (2 x+3) \sqrt {-x^2-4 x-3}}{2 x^2+4 x+3}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.37, size = 95, normalized size = 1.09 \begin {gather*} \frac {x+3}{2 \left (2 x^2+4 x+3\right )}+\frac {(2 x+3) \sqrt {-x^2-4 x-3}}{2 \left (2 x^2+4 x+3\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {2} x+\sqrt {2}}{\sqrt {-x^2-4 x-3}+x+1}\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 121, normalized size = 1.39 \begin {gather*} \frac {2 \, \sqrt {2} {\left (2 \, x^{2} + 4 \, x + 3\right )} \arctan \left (\sqrt {2} {\left (x + 1\right )}\right ) - \sqrt {2} {\left (2 \, x^{2} + 4 \, x + 3\right )} \arctan \left (\frac {\sqrt {2} {\left (6 \, x^{2} + 20 \, x + 15\right )} \sqrt {-x^{2} - 4 \, x - 3}}{4 \, {\left (2 \, x^{3} + 11 \, x^{2} + 18 \, x + 9\right )}}\right ) + 4 \, \sqrt {-x^{2} - 4 \, x - 3} {\left (2 \, x + 3\right )} + 4 \, x + 12}{8 \, {\left (2 \, x^{2} + 4 \, x + 3\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.46, size = 263, normalized size = 3.02 \begin {gather*} \frac {1}{4} \, \sqrt {2} \arctan \left (\sqrt {2} {\left (x + 1\right )}\right ) - \frac {1}{4} \, \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}{4} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {\sqrt {-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac {x + 3}{2 \, {\left (2 \, x^{2} + 4 \, x + 3\right )}} - \frac {\frac {10 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {7 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} - \frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{3}}{{\left (x + 2\right )}^{3}} + 3}{3 \, {\left (\frac {8 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {14 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + \frac {8 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{3}}{{\left (x + 2\right )}^{3}} + \frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{4}}{{\left (x + 2\right )}^{4}} + 3\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.09, size = 2407, normalized size = 27.67 \begin {gather*} \text {Expression too large to display} \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}{{\left (x + \sqrt {-x^{2} - 4 \, x - 3}\right )}^{2}}\,{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}{{\left (x+\sqrt {-x^2-4\,x-3}\right )}^2} \,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}{\left (x + \sqrt {- x^{2} - 4 x - 3}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________