3.734 \(\int \frac{\sqrt{\frac{-1+x}{1+x}}}{x^2} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0144775, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {1958, 94, 92, 203} \[ \tan ^{-1}\left (\sqrt{x-1} \sqrt{x+1}\right )-\frac{\sqrt{x-1} \sqrt{x+1}}{x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1958

Int[(u_.)*(((e_.)*((a_.) + (b_.)*(x_)^(n_.)))/((c_) + (d_.)*(x_)^(n_.)))^(p_), x_Symbol] :> Int[(u*(e*(a + b*x
^n))^p)/(c + d*x^n)^p, x] /; FreeQ[{a, b, c, d, e, n, p}, x] && GtQ[b*d*e, 0] && GtQ[c - (a*d)/b, 0]

Rule 94

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[((a + b
*x)^(m + 1)*(c + d*x)^n*(e + f*x)^(p + 1))/((m + 1)*(b*e - a*f)), x] - Dist[(n*(d*e - c*f))/((m + 1)*(b*e - a*
f)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && EqQ[
m + n + p + 2, 0] && GtQ[n, 0] &&  !(SumSimplerQ[p, 1] &&  !SumSimplerQ[m, 1])

Rule 92

Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))), x_Symbol] :> Dist[b*f, Subst[I
nt[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sqrt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] &&
 EqQ[2*b*d*e - f*(b*c + a*d), 0]

Rule 203

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

Rubi steps

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

Mathematica [A]  time = 0.0044747, size = 50, normalized size = 1.39 \[ \frac{\sqrt{\frac{x-1}{x+1}} \left (-x^2+\sqrt{x^2-1} x \tan ^{-1}\left (\sqrt{x^2-1}\right )+1\right )}{(x-1) x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.013, size = 60, normalized size = 1.7 \begin{align*} -{\frac{1+x}{x}\sqrt{{\frac{x-1}{1+x}}} \left ( - \left ({x}^{2}-1 \right ) ^{{\frac{3}{2}}}+{x}^{2}\sqrt{{x}^{2}-1}+\arctan \left ({\frac{1}{\sqrt{{x}^{2}-1}}} \right ) x \right ){\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(((x-1)/(1+x))^(1/2)/x^2,x)

[Out]

-((x-1)/(1+x))^(1/2)*(1+x)*(-(x^2-1)^(3/2)+x^2*(x^2-1)^(1/2)+arctan(1/(x^2-1)^(1/2))*x)/((x-1)*(1+x))^(1/2)/x

________________________________________________________________________________________

Maxima [A]  time = 1.4739, size = 55, normalized size = 1.53 \begin{align*} -\frac{2 \, \sqrt{\frac{x - 1}{x + 1}}}{\frac{x - 1}{x + 1} + 1} + 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)/x^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.15743, size = 69, normalized size = 1.92 \begin{align*} -\frac{1}{2} \,{\left (\pi - 2\right )} \mathrm{sgn}\left (x + 1\right ) + 2 \, \arctan \left (-x + \sqrt{x^{2} - 1}\right ) \mathrm{sgn}\left (x + 1\right ) - \frac{2 \, \mathrm{sgn}\left (x + 1\right )}{{\left (x - \sqrt{x^{2} - 1}\right )}^{2} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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