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

Optimal. Leaf size=149 \[ -\frac {13-\frac {27 \sqrt {-1-x}}{\sqrt {3+x}}}{18 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )}-\frac {2 \left (2-\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )}{9 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )^2}-\frac {3 \tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-1-x}}{\sqrt {3+x}}}{\sqrt {2}}\right )}{2 \sqrt {2}} \]

[Out]

-3/4*arctan(1/2*(1-3*(-1-x)^(1/2)/(3+x)^(1/2))*2^(1/2))*2^(1/2)+1/18*(-13+27*(-1-x)^(1/2)/(3+x)^(1/2))/(1-3*(1
+x)/(3+x)-2*(-1-x)^(1/2)/(3+x)^(1/2))-2/9*(2-(-1-x)^(1/2)/(3+x)^(1/2))/(1-3*(1+x)/(3+x)-2*(-1-x)^(1/2)/(3+x)^(
1/2))^2

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {12, 1674, 652, 632, 210} \begin {gather*} -\frac {3 \text {ArcTan}\left (\frac {1-\frac {3 \sqrt {-x-1}}{\sqrt {x+3}}}{\sqrt {2}}\right )}{2 \sqrt {2}}-\frac {13-\frac {27 \sqrt {-x-1}}{\sqrt {x+3}}}{18 \left (-\frac {3 (x+1)}{x+3}-\frac {2 \sqrt {-x-1}}{\sqrt {x+3}}+1\right )}-\frac {2 \left (2-\frac {\sqrt {-x-1}}{\sqrt {x+3}}\right )}{9 \left (-\frac {3 (x+1)}{x+3}-\frac {2 \sqrt {-x-1}}{\sqrt {x+3}}+1\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/18*(13 - (27*Sqrt[-1 - x])/Sqrt[3 + x])/(1 - (3*(1 + x))/(3 + x) - (2*Sqrt[-1 - x])/Sqrt[3 + x]) - (2*(2 -
Sqrt[-1 - x]/Sqrt[3 + x]))/(9*(1 - (3*(1 + x))/(3 + x) - (2*Sqrt[-1 - x])/Sqrt[3 + x])^2) - (3*ArcTan[(1 - (3*
Sqrt[-1 - x])/Sqrt[3 + x])/Sqrt[2]])/(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]

Rule 1674

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[(b*f - 2*a*g + (2*c*f - b*g)*x)*((a + b*x + c*x^2)^(p + 1)/((p + 1)*(b^2 - 4*a*c)
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rubi steps

\begin {align*} \int \frac {1}{\left (x+\sqrt {-3-4 x-x^2}\right )^3} \, dx &=2 \text {Subst}\left (\int \frac {2 x \left (1+x^2\right )}{\left (1-2 x+3 x^2\right )^3} \, 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 )^3} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=-\frac {2 \left (2-\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )}{9 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )^2}+\frac {1}{4} \text {Subst}\left (\int \frac {\frac {56}{9}+\frac {16 x}{3}}{\left (1-2 x+3 x^2\right )^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=-\frac {13-\frac {27 \sqrt {-1-x}}{\sqrt {3+x}}}{18 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )}-\frac {2 \left (2-\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )}{9 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )^2}+\frac {3}{2} \text {Subst}\left (\int \frac {1}{1-2 x+3 x^2} \, dx,x,\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=-\frac {13-\frac {27 \sqrt {-1-x}}{\sqrt {3+x}}}{18 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )}-\frac {2 \left (2-\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )}{9 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )^2}-3 \text {Subst}\left (\int \frac {1}{-8-x^2} \, dx,x,-2+\frac {6 \sqrt {-1-x}}{\sqrt {3+x}}\right )\\ &=-\frac {13-\frac {27 \sqrt {-1-x}}{\sqrt {3+x}}}{18 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )}-\frac {2 \left (2-\frac {\sqrt {-1-x}}{\sqrt {3+x}}\right )}{9 \left (1-\frac {3 (1+x)}{3+x}-\frac {2 \sqrt {-1-x}}{\sqrt {3+x}}\right )^2}-\frac {3 \tan ^{-1}\left (\frac {1-\frac {3 \sqrt {-1-x}}{\sqrt {3+x}}}{\sqrt {2}}\right )}{2 \sqrt {2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.40, size = 109, normalized size = 0.73 \begin {gather*} -\frac {9+15 x+16 x^2+6 x^3+\sqrt {-3-4 x-x^2} \left (15+26 x+22 x^2+8 x^3\right )+3 \sqrt {2} \left (3+4 x+2 x^2\right )^2 \tan ^{-1}\left (\frac {\sqrt {2} (1+x)}{1+x+\sqrt {-3-4 x-x^2}}\right )}{4 \left (3+4 x+2 x^2\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/4*(9 + 15*x + 16*x^2 + 6*x^3 + Sqrt[-3 - 4*x - x^2]*(15 + 26*x + 22*x^2 + 8*x^3) + 3*Sqrt[2]*(3 + 4*x + 2*x
^2)^2*ArcTan[(Sqrt[2]*(1 + x))/(1 + x + Sqrt[-3 - 4*x - x^2])])/(3 + 4*x + 2*x^2)^2

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(14529\) vs. \(2(120)=240\).
time = 0.36, size = 14530, normalized size = 97.52

method result size
trager \(\frac {\left (4 x^{3}+10 x^{2}+12 x +9\right ) x}{4 \left (2 x^{2}+4 x +3\right )^{2}}-\frac {\left (8 x^{3}+22 x^{2}+26 x +15\right ) \sqrt {-x^{2}-4 x -3}}{4 \left (2 x^{2}+4 x +3\right )^{2}}-\frac {3 \RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {-2 \RootOf \left (\textit {\_Z}^{2}+2\right ) x +2 \sqrt {-x^{2}-4 x -3}-3 \RootOf \left (\textit {\_Z}^{2}+2\right )}{\RootOf \left (\textit {\_Z}^{2}+2\right ) x +2 x +3}\right )}{8}\) \(130\)
default \(\text {Expression too large to display}\) \(14530\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

result too large to display

________________________________________________________________________________________

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))^3,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 171, normalized size = 1.15 \begin {gather*} -\frac {24 \, x^{3} + 6 \, \sqrt {2} {\left (4 \, x^{4} + 16 \, x^{3} + 28 \, x^{2} + 24 \, x + 9\right )} \arctan \left (\sqrt {2} {\left (x + 1\right )}\right ) - 3 \, \sqrt {2} {\left (4 \, x^{4} + 16 \, x^{3} + 28 \, x^{2} + 24 \, x + 9\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 ) + 64 \, x^{2} + 4 \, {\left (8 \, x^{3} + 22 \, x^{2} + 26 \, x + 15\right )} \sqrt {-x^{2} - 4 \, x - 3} + 60 \, x + 36}{16 \, {\left (4 \, x^{4} + 16 \, x^{3} + 28 \, x^{2} + 24 \, x + 9\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/16*(24*x^3 + 6*sqrt(2)*(4*x^4 + 16*x^3 + 28*x^2 + 24*x + 9)*arctan(sqrt(2)*(x + 1)) - 3*sqrt(2)*(4*x^4 + 16
*x^3 + 28*x^2 + 24*x + 9)*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)) + 64*x^2 + 4*(8*x^3 + 22*x^2 + 26*x + 15)*sqrt(-x^2 - 4*x - 3) + 60*x + 36)/(4*x^4 + 16*x^3 + 28*x^2 + 24
*x + 9)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 367 vs. \(2 (119) = 238\).
time = 2.02, size = 367, normalized size = 2.46 \begin {gather*} -\frac {3}{8} \, \sqrt {2} \arctan \left (\sqrt {2} {\left (x + 1\right )}\right ) + \frac {3}{8} \, \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 {3}{8} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {\sqrt {-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) - \frac {6 \, x^{3} + 16 \, x^{2} + 15 \, x + 9}{4 \, {\left (2 \, x^{2} + 4 \, x + 3\right )}^{2}} + \frac {\frac {618 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {1547 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + \frac {2362 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{3}}{{\left (x + 2\right )}^{3}} + \frac {2223 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{4}}{{\left (x + 2\right )}^{4}} + \frac {1174 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{5}}{{\left (x + 2\right )}^{5}} + \frac {377 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{6}}{{\left (x + 2\right )}^{6}} + \frac {6 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{7}}{{\left (x + 2\right )}^{7}} + 117}{18 \, {\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 )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3/8*sqrt(2)*arctan(sqrt(2)*(x + 1)) + 3/8*sqrt(2)*arctan(1/2*sqrt(2)*(3*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) +
1)) + 3/8*sqrt(2)*arctan(1/2*sqrt(2)*((sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) - 1/4*(6*x^3 + 16*x^2 + 15*x +
9)/(2*x^2 + 4*x + 3)^2 + 1/18*(618*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1547*(sqrt(-x^2 - 4*x - 3) - 1)^2/(x +
 2)^2 + 2362*(sqrt(-x^2 - 4*x - 3) - 1)^3/(x + 2)^3 + 2223*(sqrt(-x^2 - 4*x - 3) - 1)^4/(x + 2)^4 + 1174*(sqrt
(-x^2 - 4*x - 3) - 1)^5/(x + 2)^5 + 377*(sqrt(-x^2 - 4*x - 3) - 1)^6/(x + 2)^6 + 6*(sqrt(-x^2 - 4*x - 3) - 1)^
7/(x + 2)^7 + 117)/(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)^2

________________________________________________________________________________________

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 )}^3} \,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))^3,x)

[Out]

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

________________________________________________________________________________________