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

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

Optimal result

Integrand size = 21, antiderivative size = 79 \[ \int \frac {1+x^2}{\sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {2 \sqrt {1+x^2} \left (7 x+19 x^3+4 x^5\right )}{5 \left (x+\sqrt {1+x^2}\right )^{7/2}}+\frac {2 \left (9+112 x^2+147 x^4+28 x^6\right )}{35 \left (x+\sqrt {1+x^2}\right )^{7/2}} \]

[Out]

2/5*(x^2+1)^(1/2)*(4*x^5+19*x^3+7*x)/(x+(x^2+1)^(1/2))^(7/2)+2/35*(28*x^6+147*x^4+112*x^2+9)/(x+(x^2+1)^(1/2))
^(7/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.97, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2147, 276} \[ \int \frac {1+x^2}{\sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {1}{20} \left (\sqrt {x^2+1}+x\right )^{5/2}+\frac {3}{4} \sqrt {\sqrt {x^2+1}+x}-\frac {1}{4 \left (\sqrt {x^2+1}+x\right )^{3/2}}-\frac {1}{28 \left (\sqrt {x^2+1}+x\right )^{7/2}} \]

[In]

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

[Out]

-1/28*1/(x + Sqrt[1 + x^2])^(7/2) - 1/(4*(x + Sqrt[1 + x^2])^(3/2)) + (3*Sqrt[x + Sqrt[1 + x^2]])/4 + (x + Sqr
t[1 + x^2])^(5/2)/20

Rule 276

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

Rule 2147

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

Rubi steps \begin{align*} \text {integral}& = \frac {1}{8} \text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^{9/2}} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = \frac {1}{8} \text {Subst}\left (\int \left (\frac {1}{x^{9/2}}+\frac {3}{x^{5/2}}+\frac {3}{\sqrt {x}}+x^{3/2}\right ) \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{28 \left (x+\sqrt {1+x^2}\right )^{7/2}}-\frac {1}{4 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {3}{4} \sqrt {x+\sqrt {1+x^2}}+\frac {1}{20} \left (x+\sqrt {1+x^2}\right )^{5/2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.76 \[ \int \frac {1+x^2}{\sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {2 \left (9+112 x^2+147 x^4+28 x^6+7 x \sqrt {1+x^2} \left (7+19 x^2+4 x^4\right )\right )}{35 \left (x+\sqrt {1+x^2}\right )^{7/2}} \]

[In]

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

[Out]

(2*(9 + 112*x^2 + 147*x^4 + 28*x^6 + 7*x*Sqrt[1 + x^2]*(7 + 19*x^2 + 4*x^4)))/(35*(x + Sqrt[1 + x^2])^(7/2))

Maple [C] (verified)

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

Time = 0.09 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.06

method result size
meijerg \(-\frac {-\frac {32 \sqrt {\pi }\, \sqrt {2}\, \cosh \left (\frac {3 \,\operatorname {arcsinh}\left (\frac {1}{x}\right )}{2}\right )}{3 x^{\frac {3}{2}}}-\frac {8 \sqrt {\pi }\, \sqrt {2}\, x^{\frac {3}{2}} \left (-\frac {4}{3 x^{4}}-\frac {2}{3 x^{2}}+\frac {2}{3}\right ) \sinh \left (\frac {3 \,\operatorname {arcsinh}\left (\frac {1}{x}\right )}{2}\right )}{\sqrt {1+\frac {1}{x^{2}}}}}{8 \sqrt {\pi }}+\frac {\sqrt {2}\, x^{\frac {5}{2}} \operatorname {hypergeom}\left (\left [-\frac {5}{4}, \frac {1}{4}, \frac {3}{4}\right ], \left [-\frac {1}{4}, \frac {3}{2}\right ], -\frac {1}{x^{2}}\right )}{5}\) \(84\)

[In]

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

[Out]

-1/8/Pi^(1/2)*(-32/3*Pi^(1/2)*2^(1/2)/x^(3/2)*cosh(3/2*arcsinh(1/x))-8*Pi^(1/2)*2^(1/2)*x^(3/2)*(-4/3/x^4-2/3/
x^2+2/3)*sinh(3/2*arcsinh(1/x))/(1+1/x^2)^(1/2))+1/5*2^(1/2)*x^(5/2)*hypergeom([-5/4,1/4,3/4],[-1/4,3/2],-1/x^
2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.54 \[ \int \frac {1+x^2}{\sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {2}{35} \, {\left (5 \, x^{4} + 12 \, x^{2} - {\left (5 \, x^{3} + 13 \, x\right )} \sqrt {x^{2} + 1} - 9\right )} \sqrt {x + \sqrt {x^{2} + 1}} \]

[In]

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

[Out]

-2/35*(5*x^4 + 12*x^2 - (5*x^3 + 13*x)*sqrt(x^2 + 1) - 9)*sqrt(x + sqrt(x^2 + 1))

Sympy [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.16 \[ \int \frac {1+x^2}{\sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {12 x^{3}}{35 \sqrt {x + \sqrt {x^{2} + 1}}} + \frac {2 x^{2} \sqrt {x^{2} + 1}}{35 \sqrt {x + \sqrt {x^{2} + 1}}} + \frac {44 x}{35 \sqrt {x + \sqrt {x^{2} + 1}}} + \frac {18 \sqrt {x^{2} + 1}}{35 \sqrt {x + \sqrt {x^{2} + 1}}} \]

[In]

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

[Out]

12*x**3/(35*sqrt(x + sqrt(x**2 + 1))) + 2*x**2*sqrt(x**2 + 1)/(35*sqrt(x + sqrt(x**2 + 1))) + 44*x/(35*sqrt(x
+ sqrt(x**2 + 1))) + 18*sqrt(x**2 + 1)/(35*sqrt(x + sqrt(x**2 + 1)))

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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