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

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

Optimal result

Integrand size = 19, antiderivative size = 62 \[ \int \frac {1+x^2}{\sqrt {1+\sqrt {1+x}}} \, dx=-\frac {8 \left (1187-4 x+175 x^2\right ) \sqrt {1+\sqrt {1+x}}}{3465}+\frac {4 \sqrt {1+x} \left (1091+40 x+315 x^2\right ) \sqrt {1+\sqrt {1+x}}}{3465} \]

[Out]

-8/3465*(175*x^2-4*x+1187)*(1+(1+x)^(1/2))^(1/2)+4/3465*(1+x)^(1/2)*(315*x^2+40*x+1091)*(1+(1+x)^(1/2))^(1/2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.63, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {1914, 1634} \[ \int \frac {1+x^2}{\sqrt {1+\sqrt {1+x}}} \, dx=\frac {4}{11} \left (\sqrt {x+1}+1\right )^{11/2}-\frac {20}{9} \left (\sqrt {x+1}+1\right )^{9/2}+\frac {32}{7} \left (\sqrt {x+1}+1\right )^{7/2}-\frac {16}{5} \left (\sqrt {x+1}+1\right )^{5/2}+\frac {4}{3} \left (\sqrt {x+1}+1\right )^{3/2}-4 \sqrt {\sqrt {x+1}+1} \]

[In]

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

[Out]

-4*Sqrt[1 + Sqrt[1 + x]] + (4*(1 + Sqrt[1 + x])^(3/2))/3 - (16*(1 + Sqrt[1 + x])^(5/2))/5 + (32*(1 + Sqrt[1 +
x])^(7/2))/7 - (20*(1 + Sqrt[1 + x])^(9/2))/9 + (4*(1 + Sqrt[1 + x])^(11/2))/11

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 1914

Int[(Px_)^(q_.)*((a_.) + (b_.)*((c_) + (d_.)*(x_))^(n_))^(p_), x_Symbol] :> With[{k = Denominator[n]}, Dist[k/
d, Subst[Int[SimplifyIntegrand[x^(k - 1)*(Px /. x -> x^k/d - c/d)^q*(a + b*x^(k*n))^p, x], x], x, (c + d*x)^(1
/k)], x]] /; FreeQ[{a, b, c, d, p}, x] && PolynomialQ[Px, x] && IntegerQ[q] && FractionQ[n]

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

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.94 \[ \int \frac {1+x^2}{\sqrt {1+\sqrt {1+x}}} \, dx=\frac {4 \sqrt {1+\sqrt {1+x}} \left (-2732+1366 \sqrt {1+x}+708 (1+x)-590 (1+x)^{3/2}-350 (1+x)^2+315 (1+x)^{5/2}\right )}{3465} \]

[In]

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

[Out]

(4*Sqrt[1 + Sqrt[1 + x]]*(-2732 + 1366*Sqrt[1 + x] + 708*(1 + x) - 590*(1 + x)^(3/2) - 350*(1 + x)^2 + 315*(1
+ x)^(5/2)))/3465

Maple [C] (verified)

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

Time = 0.39 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.61

method result size
meijerg \(\frac {\sqrt {2}\, x \operatorname {hypergeom}\left (\left [\frac {1}{4}, \frac {3}{4}, 1\right ], \left [\frac {3}{2}, 2\right ], -x \right )}{2}+\frac {\sqrt {2}\, x^{3} \operatorname {hypergeom}\left (\left [\frac {1}{4}, \frac {3}{4}, 3\right ], \left [\frac {3}{2}, 4\right ], -x \right )}{6}\) \(38\)
derivativedivides \(\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {11}{2}}}{11}-\frac {20 \left (\sqrt {1+x}+1\right )^{\frac {9}{2}}}{9}+\frac {32 \left (\sqrt {1+x}+1\right )^{\frac {7}{2}}}{7}-\frac {16 \left (\sqrt {1+x}+1\right )^{\frac {5}{2}}}{5}+\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {3}{2}}}{3}-4 \sqrt {\sqrt {1+x}+1}\) \(68\)
default \(\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {11}{2}}}{11}-\frac {20 \left (\sqrt {1+x}+1\right )^{\frac {9}{2}}}{9}+\frac {32 \left (\sqrt {1+x}+1\right )^{\frac {7}{2}}}{7}-\frac {16 \left (\sqrt {1+x}+1\right )^{\frac {5}{2}}}{5}+\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {3}{2}}}{3}-4 \sqrt {\sqrt {1+x}+1}\) \(68\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.61 \[ \int \frac {1+x^2}{\sqrt {1+\sqrt {1+x}}} \, dx=-\frac {4}{3465} \, {\left (350 \, x^{2} - {\left (315 \, x^{2} + 40 \, x + 1091\right )} \sqrt {x + 1} - 8 \, x + 2374\right )} \sqrt {\sqrt {x + 1} + 1} \]

[In]

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

[Out]

-4/3465*(350*x^2 - (315*x^2 + 40*x + 1091)*sqrt(x + 1) - 8*x + 2374)*sqrt(sqrt(x + 1) + 1)

Sympy [A] (verification not implemented)

Time = 0.53 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.42 \[ \int \frac {1+x^2}{\sqrt {1+\sqrt {1+x}}} \, dx=\frac {4 \left (\sqrt {x + 1} + 1\right )^{\frac {11}{2}}}{11} - \frac {20 \left (\sqrt {x + 1} + 1\right )^{\frac {9}{2}}}{9} + \frac {32 \left (\sqrt {x + 1} + 1\right )^{\frac {7}{2}}}{7} - \frac {16 \left (\sqrt {x + 1} + 1\right )^{\frac {5}{2}}}{5} + \frac {4 \left (\sqrt {x + 1} + 1\right )^{\frac {3}{2}}}{3} - 4 \sqrt {\sqrt {x + 1} + 1} \]

[In]

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

[Out]

4*(sqrt(x + 1) + 1)**(11/2)/11 - 20*(sqrt(x + 1) + 1)**(9/2)/9 + 32*(sqrt(x + 1) + 1)**(7/2)/7 - 16*(sqrt(x +
1) + 1)**(5/2)/5 + 4*(sqrt(x + 1) + 1)**(3/2)/3 - 4*sqrt(sqrt(x + 1) + 1)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.08 \[ \int \frac {1+x^2}{\sqrt {1+\sqrt {1+x}}} \, dx=\frac {4}{11} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {11}{2}} - \frac {20}{9} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {9}{2}} + \frac {32}{7} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {7}{2}} - \frac {16}{5} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {5}{2}} + \frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} - 4 \, \sqrt {\sqrt {x + 1} + 1} \]

[In]

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

[Out]

4/11*(sqrt(x + 1) + 1)^(11/2) - 20/9*(sqrt(x + 1) + 1)^(9/2) + 32/7*(sqrt(x + 1) + 1)^(7/2) - 16/5*(sqrt(x + 1
) + 1)^(5/2) + 4/3*(sqrt(x + 1) + 1)^(3/2) - 4*sqrt(sqrt(x + 1) + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.08 \[ \int \frac {1+x^2}{\sqrt {1+\sqrt {1+x}}} \, dx=\frac {4}{11} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {11}{2}} - \frac {20}{9} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {9}{2}} + \frac {32}{7} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {7}{2}} - \frac {16}{5} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {5}{2}} + \frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} - 4 \, \sqrt {\sqrt {x + 1} + 1} \]

[In]

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

[Out]

4/11*(sqrt(x + 1) + 1)^(11/2) - 20/9*(sqrt(x + 1) + 1)^(9/2) + 32/7*(sqrt(x + 1) + 1)^(7/2) - 16/5*(sqrt(x + 1
) + 1)^(5/2) + 4/3*(sqrt(x + 1) + 1)^(3/2) - 4*sqrt(sqrt(x + 1) + 1)

Mupad [F(-1)]

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

[In]

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

[Out]

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