3.8.60 \(\int \frac {1}{(x+\sqrt {-3-4 x-x^2})^2} \, dx\) [760]

Optimal. Leaf size=87 \[ \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}} \]

[Out]

1/2*arctan(1/2*(1-3*(-1-x)^(1/2)/(3+x)^(1/2))*2^(1/2))*2^(1/2)+(1-(-1-x)^(1/2)/(3+x)^(1/2))/(1-3*(1+x)/(3+x)-2
*(-1-x)^(1/2)/(3+x)^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.05, 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, 652, 632, 210} \begin {gather*} \frac {\text {ArcTan}\left (\frac {1-\frac {3 \sqrt {-x-1}}{\sqrt {x+3}}}{\sqrt {2}}\right )}{\sqrt {2}}+\frac {1-\frac {\sqrt {-x-1}}{\sqrt {x+3}}}{-\frac {3 (x+1)}{x+3}-\frac {2 \sqrt {-x-1}}{\sqrt {x+3}}+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x + Sqrt[-3 - 4*x - x^2])^(-2),x]

[Out]

(1 - Sqrt[-1 - x]/Sqrt[3 + x])/(1 - (3*(1 + x))/(3 + x) - (2*Sqrt[-1 - x])/Sqrt[3 + x]) + ArcTan[(1 - (3*Sqrt[
-1 - x])/Sqrt[3 + x])/Sqrt[2]]/Sqrt[2]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 652

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b*d - 2*a*e + (2*c*d -
b*e)*x)/((p + 1)*(b^2 - 4*a*c)))*(a + b*x + c*x^2)^(p + 1), x] - Dist[(2*p + 3)*((2*c*d - b*e)/((p + 1)*(b^2 -
 4*a*c))), Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^
2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2]

Rubi steps

\begin {align*} \int \frac {1}{\left (x+\sqrt {-3-4 x-x^2}\right )^2} \, dx &=2 \text {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 \text {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}}}-\text {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 \text {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 [A]
time = 0.34, size = 84, normalized size = 0.97 \begin {gather*} \frac {3+x+(3+2 x) \sqrt {-3-4 x-x^2}+\sqrt {2} \left (3+4 x+2 x^2\right ) \tan ^{-1}\left (\frac {\sqrt {2} (1+x)}{1+x+\sqrt {-3-4 x-x^2}}\right )}{2 \left (3+4 x+2 x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x + Sqrt[-3 - 4*x - x^2])^(-2),x]

[Out]

(3 + x + (3 + 2*x)*Sqrt[-3 - 4*x - x^2] + Sqrt[2]*(3 + 4*x + 2*x^2)*ArcTan[(Sqrt[2]*(1 + x))/(1 + x + Sqrt[-3
- 4*x - x^2])])/(2*(3 + 4*x + 2*x^2))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2406\) vs. \(2(73)=146\).
time = 0.20, size = 2407, normalized size = 27.67

method result size
trager \(-\frac {\left (3+2 x \right ) x}{2 \left (2 x^{2}+4 x +3\right )}+\frac {\left (3+2 x \right ) \sqrt {-x^{2}-4 x -3}}{4 x^{2}+8 x +6}-\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {2 \RootOf \left (\textit {\_Z}^{2}+2\right ) x +3 \RootOf \left (\textit {\_Z}^{2}+2\right )+2 \sqrt {-x^{2}-4 x -3}}{\RootOf \left (\textit {\_Z}^{2}+2\right ) x -2 x -3}\right )}{4}\) \(110\)
default \(\text {Expression too large to display}\) \(2407\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x+(-x^2-4*x-3)^(1/2))^2,x,method=_RETURNVERBOSE)

[Out]

-3/8*(4+4*x)/(2*x^2+4*x+3)+1/4*2^(1/2)*arctan(1/4*(4+4*x)*2^(1/2))-1/2*(-6-4*x)/(2*x^2+4*x+3)+1/36*3^(1/2)*4^(
1/2)*(3*x^2/(-3/2-x)^2-12)^(1/2)*(7*2^(1/2)*arctan(1/6*(3*x^2/(-3/2-x)^2-12)^(1/2)*2^(1/2))+4*arctanh(3*x/(-3/
2-x)/(3*x^2/(-3/2-x)^2-12)^(1/2)))/((x^2/(-3/2-x)^2-4)/(1+x/(-3/2-x))^2)^(1/2)/(1+x/(-3/2-x))+1/72*3^(1/2)*4^(
1/2)*(3*x^2/(-3/2-x)^2-12)^(1/2)*(arctan(1/6*(3*x^2/(-3/2-x)^2-12)^(1/2)*2^(1/2))*2^(1/2)*x^2/(-3/2-x)^2-8*arc
tanh(3*x/(-3/2-x)/(3*x^2/(-3/2-x)^2-12)^(1/2))*x^2/(-3/2-x)^2+2*2^(1/2)*arctan(1/6*(3*x^2/(-3/2-x)^2-12)^(1/2)
*2^(1/2))-16*arctanh(3*x/(-3/2-x)/(3*x^2/(-3/2-x)^2-12)^(1/2))-6*(3*x^2/(-3/2-x)^2-12)^(1/2))/((x^2/(-3/2-x)^2
-4)/(1+x/(-3/2-x))^2)^(1/2)/(1+x/(-3/2-x))/(x^2/(-3/2-x)^2+2)-2/9*3^(1/2)*4^(1/2)*(3*x^2/(-3/2-x)^2-12)^(1/2)*
(2^(1/2)*arctan(1/6*(3*x^2/(-3/2-x)^2-12)^(1/2)*2^(1/2))+arctanh(3*x/(-3/2-x)/(3*x^2/(-3/2-x)^2-12)^(1/2)))/((
x^2/(-3/2-x)^2-4)/(1+x/(-3/2-x))^2)^(1/2)/(1+x/(-3/2-x))-2/9*3^(1/2)*4^(1/2)*(3*x^2/(-3/2-x)^2-12)^(1/2)*(3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^2/(-3/2-x)^2-96*ln(((3*x^2/(-3/2-x)^2-12)^(1/2)*x/(-3/2-x)-x^2/(-3/
2-x)^2+4)/(x^2/(-3/2-x)^2-4))*x^2/(-3/2-x)^2-8*(3*x^2/(-3/2-x)^2-12)^(1/2)*x^2/(-3/2-x)^2+96*ln(((3*x^2/(-3/2-
x)^2-12)^(1/2)*x/(-3/2-x)+x^2/(-3/2-x)^2-4)/(x^2/(-3/2-x)^2-4))*x^2/(-3/2-x)^2-176*2^(1/2)*arctan(1/6*(3*x^2/(
-3/2-x)^2-12)^(1/2)*2^(1/2))-32*(3*x^2/(-3/2-x)^2-12)^(1/2)*x/(-3/2-x)-384*arctanh(3*x/(-3/2-x)/(3*x^2/(-3/2-x
)^2-12)^(1/2))-128*ln(((3*x^2/(-3/2-x)^2-12)^(1/2)*x/(-3/2-x)-x^2/(-3/2-x)^2+4)/(x^2/(-3/2-x)^2-4))+16*(3*x^2/
(-3/2-x)^2-12)^(1/2)+128*ln(((3*x^2/(-3/2-x)^2-12)^(1/2)*x/(-3/2-x)+x^2/(-3/2-x)^2-4)/(x^2/(-3/2-x)^2-4)))/((x
^2/(-3/2-x)^2-4)/(1+x/(-3/2-x))^2)^(1/2)/(1+x/(-3/2-x))/(x^2/(-3/2-x)^2+2)/((3*x^2/(-3/2-x)^2-12)^(1/2)*x/(-3/
2-x)+x^2/(-3/2-x)^2-4)/((3*x^2/(-3/2-x)^2-12)^(1/2)*x/(-3/2-x)-x^2/(-3/2-x)^2+4)

________________________________________________________________________________________

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]

integrate(1/(x+(-x^2-4*x-3)^(1/2))^2,x, algorithm="maxima")

[Out]

integrate((x + sqrt(-x^2 - 4*x - 3))^(-2), x)

________________________________________________________________________________________

Fricas [A]
time = 0.35, 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]

integrate(1/(x+(-x^2-4*x-3)^(1/2))^2,x, algorithm="fricas")

[Out]

1/8*(2*sqrt(2)*(2*x^2 + 4*x + 3)*arctan(sqrt(2)*(x + 1)) - sqrt(2)*(2*x^2 + 4*x + 3)*arctan(1/4*sqrt(2)*(6*x^2
 + 20*x + 15)*sqrt(-x^2 - 4*x - 3)/(2*x^3 + 11*x^2 + 18*x + 9)) + 4*sqrt(-x^2 - 4*x - 3)*(2*x + 3) + 4*x + 12)
/(2*x^2 + 4*x + 3)

________________________________________________________________________________________

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]

integrate(1/(x+(-x**2-4*x-3)**(1/2))**2,x)

[Out]

Integral((x + sqrt(-x**2 - 4*x - 3))**(-2), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 263 vs. \(2 (72) = 144\).
time = 2.22, 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]

integrate(1/(x+(-x^2-4*x-3)^(1/2))^2,x, algorithm="giac")

[Out]

1/4*sqrt(2)*arctan(sqrt(2)*(x + 1)) - 1/4*sqrt(2)*arctan(1/2*sqrt(2)*(3*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1
)) - 1/4*sqrt(2)*arctan(1/2*sqrt(2)*((sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) + 1/2*(x + 3)/(2*x^2 + 4*x + 3)
- 1/3*(10*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 7*(sqrt(-x^2 - 4*x - 3) - 1)^2/(x + 2)^2 - 2*(sqrt(-x^2 - 4*x -
 3) - 1)^3/(x + 2)^3 + 3)/(8*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 14*(sqrt(-x^2 - 4*x - 3) - 1)^2/(x + 2)^2 +
8*(sqrt(-x^2 - 4*x - 3) - 1)^3/(x + 2)^3 + 3*(sqrt(-x^2 - 4*x - 3) - 1)^4/(x + 2)^4 + 3)

________________________________________________________________________________________

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]

int(1/(x + (- 4*x - x^2 - 3)^(1/2))^2,x)

[Out]

int(1/(x + (- 4*x - x^2 - 3)^(1/2))^2, x)

________________________________________________________________________________________