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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 36 \[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=-\frac {\sqrt {-1+x} \sqrt {1+x}}{x}+\arctan \left (\sqrt {-1+x} \sqrt {1+x}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {96, 94, 209} \[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=\arctan \left (\sqrt {x-1} \sqrt {x+1}\right )-\frac {\sqrt {x-1} \sqrt {x+1}}{x} \]

[In]

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

[Out]

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

Rule 94

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 96

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[m, 1] ||  !SumSimplerQ[p, 1]) && NeQ[m, -1]

Rule 209

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

Rubi steps \begin{align*} \text {integral}& = -\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}+\text {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] (verified)

Time = 0.12 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.83 \[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=-\frac {\sqrt {\frac {-1+x}{1+x}} \left (\sqrt {-1+x} (1+x)+2 x \sqrt {1+x} \arctan \left (x-\sqrt {-1+x} \sqrt {1+x}\right )\right )}{\sqrt {-1+x} x} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.05 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.19

method result size
default \(\frac {\left (-\arctan \left (\frac {1}{\sqrt {x^{2}-1}}\right ) x -\sqrt {x^{2}-1}\right ) \sqrt {x -1}\, \sqrt {x +1}}{x \sqrt {x^{2}-1}}\) \(43\)
risch \(-\frac {\sqrt {x -1}\, \sqrt {x +1}}{x}-\frac {\arctan \left (\frac {1}{\sqrt {x^{2}-1}}\right ) \sqrt {\left (x -1\right ) \left (x +1\right )}}{\sqrt {x -1}\, \sqrt {x +1}}\) \(46\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.08 \[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=\frac {2 \, x \arctan \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) - \sqrt {x + 1} \sqrt {x - 1} - x}{x} \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=\int \frac {\sqrt {x - 1}}{x^{2} \sqrt {x + 1}}\, dx \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.56 \[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=-\frac {\sqrt {x^{2} - 1}}{x} - \arcsin \left (\frac {1}{{\left | x \right |}}\right ) \]

[In]

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

[Out]

-sqrt(x^2 - 1)/x - arcsin(1/abs(x))

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.17 \[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=-\frac {8}{{\left (\sqrt {x + 1} - \sqrt {x - 1}\right )}^{4} + 4} - 2 \, \arctan \left (\frac {1}{2} \, {\left (\sqrt {x + 1} - \sqrt {x - 1}\right )}^{2}\right ) \]

[In]

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

[Out]

-8/((sqrt(x + 1) - sqrt(x - 1))^4 + 4) - 2*arctan(1/2*(sqrt(x + 1) - sqrt(x - 1))^2)

Mupad [B] (verification not implemented)

Time = 19.79 (sec) , antiderivative size = 138, normalized size of antiderivative = 3.83 \[ \int \frac {\sqrt {-1+x}}{x^2 \sqrt {1+x}} \, dx=-\ln \left (\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}+1\right )\,1{}\mathrm {i}+\ln \left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )\,1{}\mathrm {i}-\frac {\sqrt {x-1}-\mathrm {i}}{4\,\left (\sqrt {x+1}-1\right )}-\frac {\frac {5\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}+1}{\frac {4\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}+\frac {4\,\left (\sqrt {x-1}-\mathrm {i}\right )}{\sqrt {x+1}-1}} \]

[In]

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

[Out]

log(((x - 1)^(1/2) - 1i)/((x + 1)^(1/2) - 1))*1i - log(((x - 1)^(1/2) - 1i)^2/((x + 1)^(1/2) - 1)^2 + 1)*1i -
((x - 1)^(1/2) - 1i)/(4*((x + 1)^(1/2) - 1)) - ((5*((x - 1)^(1/2) - 1i)^2)/((x + 1)^(1/2) - 1)^2 + 1)/((4*((x
- 1)^(1/2) - 1i)^3)/((x + 1)^(1/2) - 1)^3 + (4*((x - 1)^(1/2) - 1i))/((x + 1)^(1/2) - 1))