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

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1959, 288, 204} \[ \sqrt {\frac {1-x}{x+1}} (x+1)-2 \tan ^{-1}\left (\sqrt {\frac {1-x}{x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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])

Rule 288

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^
n)^(p + 1))/(b*n*(p + 1)), x] - Dist[(c^n*(m - n + 1))/(b*n*(p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 1959

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 67, normalized size = 1.76 \[ \frac {\sqrt {\frac {1-x}{x+1}} \sqrt {x+1} \left (\sqrt {x+1} (x-1)+2 \sqrt {1-x} \sin ^{-1}\left (\frac {\sqrt {1-x}}{\sqrt {2}}\right )\right )}{x-1} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.02, size = 38, normalized size = 1.00 \[ \sqrt {\frac {1-x}{x+1}} (x+1)-2 \tan ^{-1}\left (\sqrt {\frac {1-x}{x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 32, normalized size = 0.84 \[ {\left (x + 1\right )} \sqrt {-\frac {x - 1}{x + 1}} - 2 \, \arctan \left (\sqrt {-\frac {x - 1}{x + 1}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.92, size = 29, normalized size = 0.76 \[ \frac {1}{2} \, \pi \mathrm {sgn}\left (x + 1\right ) + \arcsin \relax (x) \mathrm {sgn}\left (x + 1\right ) + \sqrt {-x^{2} + 1} \mathrm {sgn}\left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.16, size = 39, normalized size = 1.03




method result size



default \(\frac {\sqrt {-\frac {-1+x}{1+x}}\, \left (1+x \right ) \left (\sqrt {-x^{2}+1}+\arcsin \relax (x )\right )}{\sqrt {-\left (1+x \right ) \left (-1+x \right )}}\) \(39\)
risch \(\left (1+x \right ) \sqrt {-\frac {-1+x}{1+x}}-\frac {\arcsin \relax (x ) \sqrt {-\frac {-1+x}{1+x}}\, \sqrt {-\left (1+x \right ) \left (-1+x \right )}}{-1+x}\) \(49\)
trager \(\left (1+x \right ) \sqrt {-\frac {-1+x}{1+x}}+\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (\RootOf \left (\textit {\_Z}^{2}+1\right ) \sqrt {-\frac {-1+x}{1+x}}\, x +\RootOf \left (\textit {\_Z}^{2}+1\right ) \sqrt {-\frac {-1+x}{1+x}}+x \right )\) \(67\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.38, size = 43, normalized size = 1.13 \[ -\frac {2 \, \sqrt {-\frac {x - 1}{x + 1}}}{\frac {x - 1}{x + 1} - 1} - 2 \, \arctan \left (\sqrt {-\frac {x - 1}{x + 1}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 43, normalized size = 1.13 \[ -2\,\mathrm {atan}\left (\sqrt {-\frac {x-1}{x+1}}\right )-\frac {2\,\sqrt {-\frac {x-1}{x+1}}}{\frac {x-1}{x+1}-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\frac {1 - x}{x + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________