Optimal. Leaf size=108 \[ -\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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, 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, 1037, 648,
632, 210, 642, 649, 209, 266} \begin {gather*} -\text {ArcTan}\left (\frac {\sqrt {-x-1}}{\sqrt {x+3}}\right )-\sqrt {2} \text {ArcTan}\left (\frac {1-\frac {3 \sqrt {-x-1}}{\sqrt {x+3}}}{\sqrt {2}}\right )+\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 ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 210
Rule 266
Rule 632
Rule 642
Rule 648
Rule 649
Rule 1037
Rubi steps
\begin {align*} \int \frac {1}{x+\sqrt {-3-4 x-x^2}} \, dx &=2 \text {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 \text {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} \text {Subst}\left (\int \frac {-2-2 x}{1+x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )+\frac {1}{2} \text {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} \text {Subst}\left (\int \frac {-2+6 x}{1-2 x+3 x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )+2 \text {Subst}\left (\int \frac {1}{1-2 x+3 x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )-\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )-\text {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 \text {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 [A]
time = 0.23, size = 81, normalized size = 0.75 \begin {gather*} \frac {1}{2} \left (-2 \tan ^{-1}\left (\frac {\sqrt {-3-4 x-x^2}}{3+x}\right )-2 \sqrt {2} \tan ^{-1}\left (\frac {\sqrt {2} (1+x)}{1+x+\sqrt {-3-4 x-x^2}}\right )+\log \left (x+\sqrt {-3-4 x-x^2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(369\) vs.
\(2(85)=170\).
time = 0.54, size = 370, normalized size = 3.43
method | result | size |
default | \(\frac {\arcsin \left (x +2\right )}{2}-\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \left (\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \sqrt {2}}{6}\right )-\arctanh \left (\frac {3 x}{\left (-\frac {3}{2}-x \right ) \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}}\right )\right )}{12 \sqrt {\frac {\frac {x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-4}{\left (1+\frac {x}{-\frac {3}{2}-x}\right )^{2}}}\, \left (1+\frac {x}{-\frac {3}{2}-x}\right )}+\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \sqrt {2}}{6}\right )}{3 \sqrt {\frac {\frac {x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-4}{\left (1+\frac {x}{-\frac {3}{2}-x}\right )^{2}}}\, \left (1+\frac {x}{-\frac {3}{2}-x}\right )}-\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \left (\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \sqrt {2}}{6}\right )+\arctanh \left (\frac {3 x}{\left (-\frac {3}{2}-x \right ) \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}}\right )\right )}{6 \sqrt {\frac {\frac {x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-4}{\left (1+\frac {x}{-\frac {3}{2}-x}\right )^{2}}}\, \left (1+\frac {x}{-\frac {3}{2}-x}\right )}+\frac {\ln \left (2 x^{2}+4 x +3\right )}{4}-\frac {\sqrt {2}\, \arctan \left (\frac {\left (4+4 x \right ) \sqrt {2}}{4}\right )}{2}\) | \(370\) |
trager | \(\text {Expression too large to display}\) | \(908\) |
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*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 187 vs.
\(2 (85) = 170\).
time = 0.40, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 197 vs.
\(2 (85) = 170\).
time = 2.17, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________