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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.012346, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {1960, 204} \[ 2 \tan ^{-1}\left (\sqrt{-\frac{x}{x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1960

Int[(x_)^(m_.)*(((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[(x^(q*(p + 1) - 1)*(-(a*e) + c*x^q)^(Simplify[(m + 1)/n] - 1
))/(b*e - d*x^q)^(Simplify[(m + 1)/n] + 1), x], x, ((e*(a + b*x^n))/(c + d*x^n))^(1/q)], x]] /; FreeQ[{a, b, c
, d, e, m, n}, x] && FractionQ[p] && IntegerQ[Simplify[(m + 1)/n]]

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{x}{1+x}}}{x} \, dx &=-\left (2 \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\sqrt{-\frac{x}{1+x}}\right )\right )\\ &=2 \tan ^{-1}\left (\sqrt{-\frac{x}{1+x}}\right )\\ \end{align*}

Mathematica [B]  time = 0.013448, size = 32, normalized size = 2.13 \[ \frac{2 \sqrt{-\frac{x}{x+1}} \sqrt{x+1} \sinh ^{-1}\left (\sqrt{x}\right )}{\sqrt{x}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.004, size = 33, normalized size = 2.2 \begin{align*}{(1+x)\sqrt{-{\frac{x}{1+x}}}\ln \left ({\frac{1}{2}}+x+\sqrt{{x}^{2}+x} \right ){\frac{1}{\sqrt{x \left ( 1+x \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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