3.8.54 \(\int \frac {1}{(x+\sqrt {3-2 x-x^2})^2} \, dx\) [754]

3.8.54.1 Optimal result
3.8.54.2 Mathematica [A] (verified)
3.8.54.3 Rubi [A] (warning: unable to verify)
3.8.54.4 Maple [C] (verified)
3.8.54.5 Fricas [A] (verification not implemented)
3.8.54.6 Sympy [F]
3.8.54.7 Maxima [F]
3.8.54.8 Giac [B] (verification not implemented)
3.8.54.9 Mupad [F(-1)]

3.8.54.1 Optimal result

Integrand size = 18, antiderivative size = 172 \[ \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^2} \, dx=\frac {2 \left (4-\sqrt {3}+\frac {3 \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )}{x}\right )}{7 \left (2-\sqrt {3}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )}{x}+\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )^2}{x^2}\right )}+\frac {8 \text {arctanh}\left (\frac {3-x-\sqrt {3} x-\sqrt {3} \sqrt {3-2 x-x^2}}{\sqrt {7} x}\right )}{7 \sqrt {7}} \]

output
8/49*arctanh(1/7*(3-x-x*3^(1/2)-3^(1/2)*(-x^2-2*x+3)^(1/2))/x*7^(1/2))*7^( 
1/2)+2/7*(4-3^(1/2)+3*(3^(1/2)-(-x^2-2*x+3)^(1/2))/x)/(2-3^(1/2)-2*(1+3^(1 
/2))*(3^(1/2)-(-x^2-2*x+3)^(1/2))/x+3^(1/2)*(3^(1/2)-(-x^2-2*x+3)^(1/2))^2 
/x^2)
 
3.8.54.2 Mathematica [A] (verified)

Time = 0.37 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.55 \[ \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^2} \, dx=\frac {3+6 \sqrt {3-2 x-x^2}-2 x \left (4+\sqrt {3-2 x-x^2}\right )}{14 \left (-3+2 x+2 x^2\right )}+\frac {8 \text {arctanh}\left (\frac {2-2 x+\sqrt {3-2 x-x^2}}{\sqrt {7} (-1+x)}\right )}{7 \sqrt {7}} \]

input
Integrate[(x + Sqrt[3 - 2*x - x^2])^(-2),x]
 
output
(3 + 6*Sqrt[3 - 2*x - x^2] - 2*x*(4 + Sqrt[3 - 2*x - x^2]))/(14*(-3 + 2*x 
+ 2*x^2)) + (8*ArcTanh[(2 - 2*x + Sqrt[3 - 2*x - x^2])/(Sqrt[7]*(-1 + x))] 
)/(7*Sqrt[7])
 
3.8.54.3 Rubi [A] (warning: unable to verify)

Time = 0.35 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {7285, 25, 2191, 27, 1083, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {1}{\left (\sqrt {-x^2-2 x+3}+x\right )^2} \, dx\)

\(\Big \downarrow \) 7285

\(\displaystyle 2 \int -\frac {-\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}+\frac {2 \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}+\sqrt {3}}{\left (\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2\right )^2}d\left (-\frac {\sqrt {3}-\sqrt {-x^2-2 x+3}}{x}\right )\)

\(\Big \downarrow \) 25

\(\displaystyle -2 \int \frac {-\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}+\frac {2 \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}+\sqrt {3}}{\left (\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2\right )^2}d\left (-\frac {\sqrt {3}-\sqrt {-x^2-2 x+3}}{x}\right )\)

\(\Big \downarrow \) 2191

\(\displaystyle 2 \left (\frac {1}{28} \int \frac {16}{\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2}d\left (-\frac {\sqrt {3}-\sqrt {-x^2-2 x+3}}{x}\right )+\frac {\frac {3 \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+4}{7 \left (\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2\right )}\right )\)

\(\Big \downarrow \) 27

\(\displaystyle 2 \left (\frac {4}{7} \int \frac {1}{\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2}d\left (-\frac {\sqrt {3}-\sqrt {-x^2-2 x+3}}{x}\right )+\frac {\frac {3 \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+4}{7 \left (\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2\right )}\right )\)

\(\Big \downarrow \) 1083

\(\displaystyle 2 \left (\frac {\frac {3 \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+4}{7 \left (\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2\right )}-\frac {8}{7} \int \frac {1}{28-\frac {\left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}}d\left (2 \left (1+\sqrt {3}\right )-\frac {2 \sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}\right )\right )\)

\(\Big \downarrow \) 219

\(\displaystyle 2 \left (\frac {4 \text {arctanh}\left (\frac {\sqrt {3}-\sqrt {-x^2-2 x+3}}{2 \sqrt {7} x}\right )}{7 \sqrt {7}}+\frac {\frac {3 \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+4}{7 \left (\frac {\sqrt {3} \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )^2}{x^2}-\frac {2 \left (1+\sqrt {3}\right ) \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+2\right )}\right )\)

input
Int[(x + Sqrt[3 - 2*x - x^2])^(-2),x]
 
output
2*((4 - Sqrt[3] + (3*(Sqrt[3] - Sqrt[3 - 2*x - x^2]))/x)/(7*(2 - Sqrt[3] - 
 (2*(1 + Sqrt[3])*(Sqrt[3] - Sqrt[3 - 2*x - x^2]))/x + (Sqrt[3]*(Sqrt[3] - 
 Sqrt[3 - 2*x - x^2])^2)/x^2)) + (4*ArcTanh[(Sqrt[3] - Sqrt[3 - 2*x - x^2] 
)/(2*Sqrt[7]*x)])/(7*Sqrt[7]))
 

3.8.54.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

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

rule 2191
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[P 
q, 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] + Simp[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]
 

rule 7285
Int[u_, x_Symbol] :> With[{lst = FunctionOfSquareRootOfQuadratic[u, x]}, Si 
mp[2   Subst[Int[lst[[1]], x], x, lst[[2]]], x] /;  !FalseQ[lst] && EqQ[lst 
[[3]], 1]] /; EulerIntegrandQ[u, x]
 
3.8.54.4 Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.29 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.60

method result size
trager \(\frac {\left (-3+x \right ) x}{14 x^{2}+14 x -21}-\frac {\left (-3+x \right ) \sqrt {-x^{2}-2 x +3}}{7 \left (2 x^{2}+2 x -3\right )}+\frac {4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-7\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-7\right ) x -3 \operatorname {RootOf}\left (\textit {\_Z}^{2}-7\right )+7 \sqrt {-x^{2}-2 x +3}}{\operatorname {RootOf}\left (\textit {\_Z}^{2}-7\right ) x +x -3}\right )}{49}\) \(104\)
default \(\text {Expression too large to display}\) \(1066\)

input
int(1/(x+(-x^2-2*x+3)^(1/2))^2,x,method=_RETURNVERBOSE)
 
output
1/7*(-3+x)*x/(2*x^2+2*x-3)-1/7*(-3+x)/(2*x^2+2*x-3)*(-x^2-2*x+3)^(1/2)+4/4 
9*RootOf(_Z^2-7)*ln(-(RootOf(_Z^2-7)*x-3*RootOf(_Z^2-7)+7*(-x^2-2*x+3)^(1/ 
2))/(RootOf(_Z^2-7)*x+x-3))
 
3.8.54.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.99 \[ \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^2} \, dx=\frac {2 \, \sqrt {7} {\left (2 \, x^{2} + 2 \, x - 3\right )} \log \left (\frac {x^{4} + 44 \, x^{3} - \sqrt {7} {\left (3 \, x^{3} + x^{2} - 45 \, x + 45\right )} \sqrt {-x^{2} - 2 \, x + 3} + 26 \, x^{2} - 276 \, x + 207}{4 \, x^{4} + 8 \, x^{3} - 8 \, x^{2} - 12 \, x + 9}\right ) + 4 \, \sqrt {7} {\left (2 \, x^{2} + 2 \, x - 3\right )} \log \left (\frac {2 \, x^{2} + \sqrt {7} {\left (2 \, x + 1\right )} + 2 \, x + 4}{2 \, x^{2} + 2 \, x - 3}\right ) - 14 \, \sqrt {-x^{2} - 2 \, x + 3} {\left (x - 3\right )} - 56 \, x + 21}{98 \, {\left (2 \, x^{2} + 2 \, x - 3\right )}} \]

input
integrate(1/(x+(-x^2-2*x+3)^(1/2))^2,x, algorithm="fricas")
 
output
1/98*(2*sqrt(7)*(2*x^2 + 2*x - 3)*log((x^4 + 44*x^3 - sqrt(7)*(3*x^3 + x^2 
 - 45*x + 45)*sqrt(-x^2 - 2*x + 3) + 26*x^2 - 276*x + 207)/(4*x^4 + 8*x^3 
- 8*x^2 - 12*x + 9)) + 4*sqrt(7)*(2*x^2 + 2*x - 3)*log((2*x^2 + sqrt(7)*(2 
*x + 1) + 2*x + 4)/(2*x^2 + 2*x - 3)) - 14*sqrt(-x^2 - 2*x + 3)*(x - 3) - 
56*x + 21)/(2*x^2 + 2*x - 3)
 
3.8.54.6 Sympy [F]

\[ \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^2} \, dx=\int \frac {1}{\left (x + \sqrt {- x^{2} - 2 x + 3}\right )^{2}}\, dx \]

input
integrate(1/(x+(-x**2-2*x+3)**(1/2))**2,x)
 
output
Integral((x + sqrt(-x**2 - 2*x + 3))**(-2), x)
 
3.8.54.7 Maxima [F]

\[ \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^2} \, dx=\int { \frac {1}{{\left (x + \sqrt {-x^{2} - 2 \, x + 3}\right )}^{2}} \,d x } \]

input
integrate(1/(x+(-x^2-2*x+3)^(1/2))^2,x, algorithm="maxima")
 
output
integrate((x + sqrt(-x^2 - 2*x + 3))^(-2), x)
 
3.8.54.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 350 vs. \(2 (132) = 264\).

Time = 0.37 (sec) , antiderivative size = 350, normalized size of antiderivative = 2.03 \[ \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^2} \, dx=-\frac {2}{49} \, \sqrt {7} \log \left (\frac {{\left | 4 \, x - 2 \, \sqrt {7} + 2 \right |}}{{\left | 4 \, x + 2 \, \sqrt {7} + 2 \right |}}\right ) + \frac {2}{49} \, \sqrt {7} \log \left (\frac {{\left | -2 \, \sqrt {7} + \frac {6 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + 4 \right |}}{{\left | 2 \, \sqrt {7} + \frac {6 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + 4 \right |}}\right ) - \frac {2}{49} \, \sqrt {7} \log \left (\frac {{\left | -2 \, \sqrt {7} + \frac {2 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} - 4 \right |}}{{\left | 2 \, \sqrt {7} + \frac {2 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} - 4 \right |}}\right ) - \frac {8 \, x - 3}{14 \, {\left (2 \, x^{2} + 2 \, x - 3\right )}} - \frac {8 \, {\left (\frac {5 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + \frac {26 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}^{2}}{{\left (x + 1\right )}^{2}} + \frac {11 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}^{3}}{{\left (x + 1\right )}^{3}} - 6\right )}}{21 \, {\left (\frac {8 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + \frac {26 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}^{2}}{{\left (x + 1\right )}^{2}} + \frac {8 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}^{3}}{{\left (x + 1\right )}^{3}} - \frac {3 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}^{4}}{{\left (x + 1\right )}^{4}} - 3\right )}} \]

input
integrate(1/(x+(-x^2-2*x+3)^(1/2))^2,x, algorithm="giac")
 
output
-2/49*sqrt(7)*log(abs(4*x - 2*sqrt(7) + 2)/abs(4*x + 2*sqrt(7) + 2)) + 2/4 
9*sqrt(7)*log(abs(-2*sqrt(7) + 6*(sqrt(-x^2 - 2*x + 3) - 2)/(x + 1) + 4)/a 
bs(2*sqrt(7) + 6*(sqrt(-x^2 - 2*x + 3) - 2)/(x + 1) + 4)) - 2/49*sqrt(7)*l 
og(abs(-2*sqrt(7) + 2*(sqrt(-x^2 - 2*x + 3) - 2)/(x + 1) - 4)/abs(2*sqrt(7 
) + 2*(sqrt(-x^2 - 2*x + 3) - 2)/(x + 1) - 4)) - 1/14*(8*x - 3)/(2*x^2 + 2 
*x - 3) - 8/21*(5*(sqrt(-x^2 - 2*x + 3) - 2)/(x + 1) + 26*(sqrt(-x^2 - 2*x 
 + 3) - 2)^2/(x + 1)^2 + 11*(sqrt(-x^2 - 2*x + 3) - 2)^3/(x + 1)^3 - 6)/(8 
*(sqrt(-x^2 - 2*x + 3) - 2)/(x + 1) + 26*(sqrt(-x^2 - 2*x + 3) - 2)^2/(x + 
 1)^2 + 8*(sqrt(-x^2 - 2*x + 3) - 2)^3/(x + 1)^3 - 3*(sqrt(-x^2 - 2*x + 3) 
 - 2)^4/(x + 1)^4 - 3)
 
3.8.54.9 Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^2} \, dx=\int \frac {1}{{\left (x+\sqrt {-x^2-2\,x+3}\right )}^2} \,d x \]

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