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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.27, antiderivative size = 83, normalized size of antiderivative = 0.91, number of steps used = 16, number of rules used = 12, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {6874, 2144, 468, 335, 304, 209, 212, 2145, 474, 12, 327, 218} \begin {gather*} -2 \text {ArcTan}\left (\sqrt {x-\sqrt {x^2+1}}\right )+\frac {\sqrt {x-\sqrt {x^2+1}}}{x}+2 \sqrt {x-\sqrt {x^2+1}}-\frac {1}{x \sqrt {x-\sqrt {x^2+1}}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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])

Rule 212

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

Rule 218

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]},
Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !Gt
Q[a/b, 0]

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 335

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/c^n))^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 468

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d
))*(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*b*e*n*(p + 1))), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a
*b*n*(p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0]
 && LtQ[p, -1] && (( !IntegerQ[p + 1/2] && NeQ[p, -5/4]) ||  !RationalQ[m] || (IGtQ[n, 0] && ILtQ[p + 1/2, 0]
&& LeQ[-1, m, (-n)*(p + 1)]))

Rule 474

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

Rule 2144

Int[((g_.) + (h_.)*(x_))^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_.) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dist[1/(2^(
m + 1)*e^(m + 1)), Subst[Int[x^(n - m - 2)*(a*f^2 + x^2)*((-a)*f^2*h + 2*e*g*x + h*x^2)^m, x], x, e*x + f*Sqrt
[a + c*x^2]], x] /; FreeQ[{a, c, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && IntegerQ[m]

Rule 2145

Int[(x_)^(p_.)*((g_) + (i_.)*(x_)^2)^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_.), x_Symbol] :>
Dist[(1/(2^(2*m + p + 1)*e^(p + 1)*f^(2*m)))*(i/c)^m, Subst[Int[x^(n - 2*m - p - 2)*((-a)*f^2 + x^2)^p*(a*f^2
+ x^2)^(2*m + 1), x], x, e*x + f*Sqrt[a + c*x^2]], x] /; FreeQ[{a, c, e, f, g, i, n}, x] && EqQ[e^2 - c*f^2, 0
] && EqQ[c*g - a*i, 0] && IntegersQ[p, 2*m] && (IntegerQ[m] || GtQ[i/c, 0])

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 84, normalized size = 0.92 \begin {gather*} \frac {2 \left (\sqrt {x-\sqrt {1+x^2}} \left (-2-x+\sqrt {1+x^2}\right )+\left (1+x-\sqrt {1+x^2}\right ) \text {ArcTan}\left (\sqrt {x-\sqrt {1+x^2}}\right )\right )}{-1-x+\sqrt {1+x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\sqrt {x -\sqrt {x^{2}+1}}}{1-\sqrt {x^{2}+1}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 50, normalized size = 0.55 \begin {gather*} -\frac {2 \, x \arctan \left (\sqrt {x - \sqrt {x^{2} + 1}}\right ) - {\left (3 \, x + \sqrt {x^{2} + 1} + 1\right )} \sqrt {x - \sqrt {x^{2} + 1}}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} -\int \frac {\sqrt {x-\sqrt {x^2+1}}}{\sqrt {x^2+1}-1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________