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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {1398, 785, 780, 216} \[ \sin ^{-1}\left (\sqrt {x}\right )-\left (\sqrt {x}+2\right ) \sqrt {1-x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 780

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(((e*f + d*g)*(2*p
 + 3) + 2*e*g*(p + 1)*x)*(a + c*x^2)^(p + 1))/(2*c*(p + 1)*(2*p + 3)), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rule 785

Int[(x_)*((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[d^m*e^m, Int[(x*(a + c*x^2)^(m
 + p))/(a*e + c*d*x)^m, x], x] /; FreeQ[{a, c, d, e, p}, x] && EqQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[p] && ILtQ[
m, 0] && EqQ[m, -1] &&  !ILtQ[p - 1/2, 0]

Rule 1398

Int[((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> With[{g = Denominator[n]}, D
ist[g, Subst[Int[x^(g - 1)*(d + e*x^(g*n))^q*(a + c*x^(2*g*n))^p, x], x, x^(1/g)], x]] /; FreeQ[{a, c, d, e, p
, q}, x] && EqQ[n2, 2*n] && FractionQ[n]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.40, size = 32, normalized size = 1.28 \[ -\sqrt {x} \sqrt {-x + 1} - 2 \, \sqrt {-x + 1} - \arcsin \left (\sqrt {-x + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-sqrt(x)*sqrt(-x + 1) - 2*sqrt(-x + 1) - arcsin(sqrt(-x + 1))

________________________________________________________________________________________

maple [B]  time = 0.01, size = 48, normalized size = 1.92 \[ \frac {\sqrt {-x +1}\, \left (\arcsin \left (2 x -1\right )-2 \sqrt {-\left (x -1\right ) x}\right ) \sqrt {x}}{2 \sqrt {-\left (x -1\right ) x}}-2 \sqrt {-x +1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.65, size = 40, normalized size = 1.60 \[ 2\,\mathrm {atan}\left (\frac {\sqrt {x}}{\sqrt {1-x}-1}\right )-2\,\sqrt {1-x}-\sqrt {x}\,\sqrt {1-x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 3.77, size = 87, normalized size = 3.48 \[ 2 \left (\begin {cases} - \sqrt {1 - x} + \frac {i \operatorname {acosh}{\left (\sqrt {1 - x} \right )}}{2} - \frac {i \left (1 - x\right )^{\frac {3}{2}}}{2 \sqrt {- x}} + \frac {i \sqrt {1 - x}}{2 \sqrt {- x}} & \text {for}\: \left |{x - 1}\right | > 1 \\\frac {\sqrt {x} \sqrt {1 - x}}{2} - \sqrt {1 - x} + \frac {\operatorname {asin}{\left (\sqrt {1 - x} \right )}}{2} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*Piecewise((-sqrt(1 - x) + I*acosh(sqrt(1 - x))/2 - I*(1 - x)**(3/2)/(2*sqrt(-x)) + I*sqrt(1 - x)/(2*sqrt(-x)
), Abs(x - 1) > 1), (sqrt(x)*sqrt(1 - x)/2 - sqrt(1 - x) + asin(sqrt(1 - x))/2, True))

________________________________________________________________________________________