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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {2144, 468, 335, 218, 212, 209} \[ \int \frac {1}{x^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=\arctan \left (\sqrt {\sqrt {x^2+1}+x}\right )+\text {arctanh}\left (\sqrt {\sqrt {x^2+1}+x}\right )-\frac {1}{x \sqrt {\sqrt {x^2+1}+x}} \]

[In]

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

[Out]

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

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

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {1+x^2}{\sqrt {x} \left (-1+x^2\right )^2} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{x \sqrt {x+\sqrt {1+x^2}}}-\text {Subst}\left (\int \frac {1}{\sqrt {x} \left (-1+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{x \sqrt {x+\sqrt {1+x^2}}}-2 \text {Subst}\left (\int \frac {1}{-1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {1}{x \sqrt {x+\sqrt {1+x^2}}}+\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 ) \\ & = -\frac {1}{x \sqrt {x+\sqrt {1+x^2}}}+\arctan \left (\sqrt {x+\sqrt {1+x^2}}\right )+\text {arctanh}\left (\sqrt {x+\sqrt {1+x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00 \[ \int \frac {1}{x^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {1}{x \sqrt {x+\sqrt {1+x^2}}}+\arctan \left (\sqrt {x+\sqrt {1+x^2}}\right )+\text {arctanh}\left (\sqrt {x+\sqrt {1+x^2}}\right ) \]

[In]

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

[Out]

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

Maple [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3.

Time = 0.14 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.42

method result size
meijerg \(-\frac {\sqrt {2}\, \operatorname {hypergeom}\left (\left [\frac {1}{4}, \frac {3}{4}, \frac {3}{4}\right ], \left [\frac {3}{2}, \frac {7}{4}\right ], -\frac {1}{x^{2}}\right )}{3 x^{\frac {3}{2}}}\) \(22\)

[In]

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

[Out]

-1/3*2^(1/2)/x^(3/2)*hypergeom([1/4,3/4,3/4],[3/2,7/4],-1/x^2)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 2.04 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.83 \[ \int \frac {1}{x^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=- \frac {\Gamma \left (\frac {1}{4}\right ) \Gamma ^{2}\left (\frac {3}{4}\right ) {{}_{3}F_{2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4}, \frac {3}{4} \\ \frac {3}{2}, \frac {7}{4} \end {matrix}\middle | {\frac {e^{i \pi }}{x^{2}}} \right )}}{4 \pi x^{\frac {3}{2}} \Gamma \left (\frac {7}{4}\right )} \]

[In]

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

[Out]

-gamma(1/4)*gamma(3/4)**2*hyper((1/4, 3/4, 3/4), (3/2, 7/4), exp_polar(I*pi)/x**2)/(4*pi*x**(3/2)*gamma(7/4))

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{x^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {1}{x^2\,\sqrt {x+\sqrt {x^2+1}}} \,d x \]

[In]

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

[Out]

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