3.738 \(\int \frac{\sqrt{\frac{1-x}{1+x}}}{-1+x} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0210876, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {1961, 204} \[ 2 \tan ^{-1}\left (\sqrt{\frac{1-x}{x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[(1 - x)/(1 + x)]/(-1 + x),x]

[Out]

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

Rule 1961

Int[(u_)^(r_.)*(((e_.)*((a_.) + (b_.)*(x_)^(n_.)))/((c_) + (d_.)*(x_)^(n_.)))^(p_), x_Symbol] :> With[{q = Den
ominator[p]}, Dist[(q*e*(b*c - a*d))/n, Subst[Int[SimplifyIntegrand[(x^(q*(p + 1) - 1)*(-(a*e) + c*x^q)^(1/n -
 1)*(u /. x -> (-(a*e) + c*x^q)^(1/n)/(b*e - d*x^q)^(1/n))^r)/(b*e - d*x^q)^(1/n + 1), x], x], x, ((e*(a + b*x
^n))/(c + d*x^n))^(1/q)], x]] /; FreeQ[{a, b, c, d, e}, x] && PolynomialQ[u, x] && FractionQ[p] && IntegerQ[1/
n] && IntegerQ[r]

Rule 204

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

Rubi steps

\begin{align*} \int \frac{\sqrt{\frac{1-x}{1+x}}}{-1+x} \, dx &=-\left (4 \operatorname{Subst}\left (\int \frac{1}{-2-2 x^2} \, dx,x,\sqrt{\frac{1-x}{1+x}}\right )\right )\\ &=2 \tan ^{-1}\left (\sqrt{\frac{1-x}{1+x}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0139678, size = 34, normalized size = 1.89 \[ \frac{\sqrt{\frac{1-x}{x+1}} \sqrt{1-x^2} \sin ^{-1}(x)}{x-1} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[(1 - x)/(1 + x)]/(-1 + x),x]

[Out]

(Sqrt[(1 - x)/(1 + x)]*Sqrt[1 - x^2]*ArcSin[x])/(-1 + x)

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 30, normalized size = 1.7 \begin{align*} -{ \left ( 1+x \right ) \arcsin \left ( x \right ) \sqrt{-{\frac{x-1}{1+x}}}{\frac{1}{\sqrt{- \left ( x-1 \right ) \left ( 1+x \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((1-x)/(1+x))^(1/2)/(x-1),x)

[Out]

-(-(x-1)/(1+x))^(1/2)*(1+x)/(-(x-1)*(1+x))^(1/2)*arcsin(x)

________________________________________________________________________________________

Maxima [A]  time = 1.44567, size = 20, normalized size = 1.11 \begin{align*} 2 \, \arctan \left (\sqrt{-\frac{x - 1}{x + 1}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*arctan(sqrt(-(x - 1)/(x + 1)))

________________________________________________________________________________________

Fricas [A]  time = 1.6908, size = 46, normalized size = 2.56 \begin{align*} 2 \, \arctan \left (\sqrt{-\frac{x - 1}{x + 1}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*arctan(sqrt(-(x - 1)/(x + 1)))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{- \frac{x - 1}{x + 1}}}{x - 1}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(-(x - 1)/(x + 1))/(x - 1), x)

________________________________________________________________________________________

Giac [A]  time = 1.18225, size = 22, normalized size = 1.22 \begin{align*} -\frac{1}{2} \, \pi \mathrm{sgn}\left (x + 1\right ) - \arcsin \left (x\right ) \mathrm{sgn}\left (x + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*pi*sgn(x + 1) - arcsin(x)*sgn(x + 1)