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

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

[Out]

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

________________________________________________________________________________________

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

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 )\\ &=2 \operatorname {Subst}\left (\int \frac {(1-x) x}{\sqrt {1-x^2}} \, dx,x,\sqrt {x}\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 = 0.90 \[ \left (\sqrt {x}-2\right ) \sqrt {1-x}-\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.64, size = 33, normalized size = 1.14 \[ \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.41, size = 29, normalized size = 1.00 \[ \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.66 \[ -\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)/(x^(1/2)+1),x)

[Out]

-1/2*(-x+1)^(1/2)*x^(1/2)*(-2*(-x*(x-1))^(1/2)+arcsin(2*x-1))/(-x*(x-1))^(1/2)-2*(-x+1)^(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.90, size = 39, normalized size = 1.34 \[ \sqrt {x}\,\sqrt {1-x}-2\,\sqrt {1-x}-2\,\mathrm {atan}\left (\frac {\sqrt {x}}{\sqrt {1-x}-1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [C]  time = 1.79, size = 32, normalized size = 1.10 \[ i \sqrt {x} \sqrt {x - 1} - 2 i \sqrt {x - 1} + i \operatorname {asinh}{\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)

[Out]

I*sqrt(x)*sqrt(x - 1) - 2*I*sqrt(x - 1) + I*asinh(sqrt(x - 1))

________________________________________________________________________________________