\(\int \sqrt {1+\sqrt {1+x}} \, dx\) [603]

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

Optimal result

Integrand size = 13, antiderivative size = 47 \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\frac {4}{15} \sqrt {1+x} \sqrt {1+\sqrt {1+x}}+\frac {4}{15} (1+3 x) \sqrt {1+\sqrt {1+x}} \]

[Out]

4/15*(1+x)^(1/2)*(1+(1+x)^(1/2))^(1/2)+4/15*(1+3*x)*(1+(1+x)^(1/2))^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.74, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {253, 196, 45} \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\frac {4}{5} \left (\sqrt {x+1}+1\right )^{5/2}-\frac {4}{3} \left (\sqrt {x+1}+1\right )^{3/2} \]

[In]

Int[Sqrt[1 + Sqrt[1 + x]],x]

[Out]

(-4*(1 + Sqrt[1 + x])^(3/2))/3 + (4*(1 + Sqrt[1 + x])^(5/2))/5

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 196

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(1/n - 1)*(a + b*x)^p, x], x, x^n], x] /
; FreeQ[{a, b, p}, x] && FractionQ[n] && IntegerQ[1/n]

Rule 253

Int[((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[1/Coefficient[v, x, 1], Subst[Int[(a + b*x^n)^p, x], x,
v], x] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && NeQ[v, x]

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.60 \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\frac {4}{15} \left (1+\sqrt {1+x}\right )^{3/2} \left (-2+3 \sqrt {1+x}\right ) \]

[In]

Integrate[Sqrt[1 + Sqrt[1 + x]],x]

[Out]

(4*(1 + Sqrt[1 + x])^(3/2)*(-2 + 3*Sqrt[1 + x]))/15

Maple [C] (verified)

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

Time = 0.38 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.36

method result size
meijerg \(\sqrt {2}\, x \operatorname {hypergeom}\left (\left [-\frac {1}{4}, \frac {1}{4}, 1\right ], \left [\frac {1}{2}, 2\right ], -x \right )\) \(17\)
derivativedivides \(\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {5}{2}}}{5}-\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {3}{2}}}{3}\) \(24\)
default \(\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {5}{2}}}{5}-\frac {4 \left (\sqrt {1+x}+1\right )^{\frac {3}{2}}}{3}\) \(24\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.45 \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\frac {4}{15} \, {\left (3 \, x + \sqrt {x + 1} + 1\right )} \sqrt {\sqrt {x + 1} + 1} \]

[In]

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

[Out]

4/15*(3*x + sqrt(x + 1) + 1)*sqrt(sqrt(x + 1) + 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (41) = 82\).

Time = 0.55 (sec) , antiderivative size = 184, normalized size of antiderivative = 3.91 \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\frac {12 \left (x + 1\right )^{\frac {7}{2}} \sqrt {\sqrt {x + 1} + 1}}{15 \left (x + 1\right )^{\frac {5}{2}} + 15 \left (x + 1\right )^{2}} - \frac {4 \left (x + 1\right )^{\frac {5}{2}} \sqrt {\sqrt {x + 1} + 1}}{15 \left (x + 1\right )^{\frac {5}{2}} + 15 \left (x + 1\right )^{2}} + \frac {8 \left (x + 1\right )^{\frac {5}{2}}}{15 \left (x + 1\right )^{\frac {5}{2}} + 15 \left (x + 1\right )^{2}} + \frac {16 \left (x + 1\right )^{3} \sqrt {\sqrt {x + 1} + 1}}{15 \left (x + 1\right )^{\frac {5}{2}} + 15 \left (x + 1\right )^{2}} - \frac {8 \left (x + 1\right )^{2} \sqrt {\sqrt {x + 1} + 1}}{15 \left (x + 1\right )^{\frac {5}{2}} + 15 \left (x + 1\right )^{2}} + \frac {8 \left (x + 1\right )^{2}}{15 \left (x + 1\right )^{\frac {5}{2}} + 15 \left (x + 1\right )^{2}} \]

[In]

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

[Out]

12*(x + 1)**(7/2)*sqrt(sqrt(x + 1) + 1)/(15*(x + 1)**(5/2) + 15*(x + 1)**2) - 4*(x + 1)**(5/2)*sqrt(sqrt(x + 1
) + 1)/(15*(x + 1)**(5/2) + 15*(x + 1)**2) + 8*(x + 1)**(5/2)/(15*(x + 1)**(5/2) + 15*(x + 1)**2) + 16*(x + 1)
**3*sqrt(sqrt(x + 1) + 1)/(15*(x + 1)**(5/2) + 15*(x + 1)**2) - 8*(x + 1)**2*sqrt(sqrt(x + 1) + 1)/(15*(x + 1)
**(5/2) + 15*(x + 1)**2) + 8*(x + 1)**2/(15*(x + 1)**(5/2) + 15*(x + 1)**2)

Maxima [C] (verification not implemented)

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

Time = 0.18 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.49 \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\frac {4}{5} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {5}{2}} - \frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} \]

[In]

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

[Out]

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

Giac [C] (verification not implemented)

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

Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.49 \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\frac {4}{5} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {5}{2}} - \frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 5.21 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.34 \[ \int \sqrt {1+\sqrt {1+x}} \, dx=\left (x+1\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{2},2;\ 3;\ -\sqrt {x+1}\right ) \]

[In]

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

[Out]

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