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

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

Optimal result

Integrand size = 19, antiderivative size = 128 \[ \int \frac {1}{\sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {32}{105} \sqrt {1+\sqrt {1+\sqrt {1+x}}}+\frac {32}{105} \sqrt {1+\sqrt {1+x}} \sqrt {1+\sqrt {1+\sqrt {1+x}}}+\sqrt {1+x} \left (-\frac {48}{35} \sqrt {1+\sqrt {1+\sqrt {1+x}}}+\frac {8}{7} \sqrt {1+\sqrt {1+x}} \sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \]

[Out]

32/105*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)+32/105*(1+(1+x)^(1/2))^(1/2)*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)+(1+x)^(1/2
)*(-48/35*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)+8/7*(1+(1+x)^(1/2))^(1/2)*(1+(1+(1+x)^(1/2))^(1/2))^(1/2))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.55, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {378, 1412, 786} \[ \int \frac {1}{\sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {8}{7} \left (\sqrt {\sqrt {x+1}+1}+1\right )^{7/2}-\frac {24}{5} \left (\sqrt {\sqrt {x+1}+1}+1\right )^{5/2}+\frac {16}{3} \left (\sqrt {\sqrt {x+1}+1}+1\right )^{3/2} \]

[In]

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

[Out]

(16*(1 + Sqrt[1 + Sqrt[1 + x]])^(3/2))/3 - (24*(1 + Sqrt[1 + Sqrt[1 + x]])^(5/2))/5 + (8*(1 + Sqrt[1 + Sqrt[1
+ x]])^(7/2))/7

Rule 378

Int[((a_) + (b_.)*(v_)^(n_))^(p_.)*(x_)^(m_.), x_Symbol] :> With[{c = Coefficient[v, x, 0], d = Coefficient[v,
 x, 1]}, Dist[1/d^(m + 1), Subst[Int[SimplifyIntegrand[(x - c)^m*(a + b*x^n)^p, x], x], x, v], x] /; NeQ[c, 0]
] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && IntegerQ[m]

Rule 786

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegr
and[(d + e*x)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IGtQ[p, 0]

Rule 1412

Int[((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> With[{g = Denominator[n]}, D
ist[g, Subst[Int[x^(g - 1)*(d + e*x^(g*n))^q*(a + c*x^(2*g*n))^p, x], x, x^(1/g)], x]] /; FreeQ[{a, c, d, e, p
, q}, x] && EqQ[n2, 2*n] && FractionQ[n]

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

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.55 \[ \int \frac {1}{\sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {8}{105} \sqrt {1+\sqrt {1+\sqrt {1+x}}} \left (4-18 \sqrt {1+x}+4 \sqrt {1+\sqrt {1+x}}+15 \sqrt {1+x} \sqrt {1+\sqrt {1+x}}\right ) \]

[In]

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

[Out]

(8*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]*(4 - 18*Sqrt[1 + x] + 4*Sqrt[1 + Sqrt[1 + x]] + 15*Sqrt[1 + x]*Sqrt[1 + Sqr
t[1 + x]]))/105

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.37

method result size
derivativedivides \(\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {7}{2}}}{7}-\frac {24 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {5}{2}}}{5}+\frac {16 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {3}{2}}}{3}\) \(47\)
default \(\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {7}{2}}}{7}-\frac {24 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {5}{2}}}{5}+\frac {16 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {3}{2}}}{3}\) \(47\)

[In]

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

[Out]

8/7*(1+(1+(1+x)^(1/2))^(1/2))^(7/2)-24/5*(1+(1+(1+x)^(1/2))^(1/2))^(5/2)+16/3*(1+(1+(1+x)^(1/2))^(1/2))^(3/2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.34 \[ \int \frac {1}{\sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {8}{105} \, {\left ({\left (15 \, \sqrt {x + 1} + 4\right )} \sqrt {\sqrt {x + 1} + 1} - 18 \, \sqrt {x + 1} + 4\right )} \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1} \]

[In]

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

[Out]

8/105*((15*sqrt(x + 1) + 4)*sqrt(sqrt(x + 1) + 1) - 18*sqrt(x + 1) + 4)*sqrt(sqrt(sqrt(x + 1) + 1) + 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 445 vs. \(2 (110) = 220\).

Time = 0.98 (sec) , antiderivative size = 445, normalized size of antiderivative = 3.48 \[ \int \frac {1}{\sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=- \frac {336 \left (x + 1\right )^{\frac {13}{4}} \sqrt [4]{\sqrt {x + 1} + 1} \sin {\left (\frac {5 \operatorname {atan}{\left (\sqrt [4]{x + 1} \right )}}{2} \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} - \frac {112 \left (x + 1\right )^{\frac {11}{4}} \sqrt [4]{\sqrt {x + 1} + 1} \sin {\left (\frac {5 \operatorname {atan}{\left (\sqrt [4]{x + 1} \right )}}{2} \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} + \frac {224 \left (x + 1\right )^{\frac {9}{4}} \sqrt [4]{\sqrt {x + 1} + 1} \sin {\left (\frac {5 \operatorname {atan}{\left (\sqrt [4]{x + 1} \right )}}{2} \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} - \frac {152 \left (x + 1\right )^{\frac {5}{2}} \left (\sqrt {x + 1} + 1\right )^{\frac {3}{4}} \cos {\left (\frac {7 \operatorname {atan}{\left (\sqrt [4]{x + 1} \right )}}{2} \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} - \frac {64 \left (x + 1\right )^{\frac {5}{2}} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} - \frac {216 \left (x + 1\right )^{3} \left (\sqrt {x + 1} + 1\right )^{\frac {3}{4}} \cos {\left (\frac {7 \operatorname {atan}{\left (\sqrt [4]{x + 1} \right )}}{2} \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} + \frac {64 \left (x + 1\right )^{2} \left (\sqrt {x + 1} + 1\right )^{\frac {3}{4}} \cos {\left (\frac {7 \operatorname {atan}{\left (\sqrt [4]{x + 1} \right )}}{2} \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} - \frac {64 \left (x + 1\right )^{2} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right )}{105 \pi \left (x + 1\right )^{\frac {5}{2}} + 105 \pi \left (x + 1\right )^{2}} \]

[In]

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

[Out]

-336*(x + 1)**(13/4)*(sqrt(x + 1) + 1)**(1/4)*sin(5*atan((x + 1)**(1/4))/2)*gamma(1/4)*gamma(3/4)/(105*pi*(x +
 1)**(5/2) + 105*pi*(x + 1)**2) - 112*(x + 1)**(11/4)*(sqrt(x + 1) + 1)**(1/4)*sin(5*atan((x + 1)**(1/4))/2)*g
amma(1/4)*gamma(3/4)/(105*pi*(x + 1)**(5/2) + 105*pi*(x + 1)**2) + 224*(x + 1)**(9/4)*(sqrt(x + 1) + 1)**(1/4)
*sin(5*atan((x + 1)**(1/4))/2)*gamma(1/4)*gamma(3/4)/(105*pi*(x + 1)**(5/2) + 105*pi*(x + 1)**2) - 152*(x + 1)
**(5/2)*(sqrt(x + 1) + 1)**(3/4)*cos(7*atan((x + 1)**(1/4))/2)*gamma(1/4)*gamma(3/4)/(105*pi*(x + 1)**(5/2) +
105*pi*(x + 1)**2) - 64*(x + 1)**(5/2)*gamma(1/4)*gamma(3/4)/(105*pi*(x + 1)**(5/2) + 105*pi*(x + 1)**2) - 216
*(x + 1)**3*(sqrt(x + 1) + 1)**(3/4)*cos(7*atan((x + 1)**(1/4))/2)*gamma(1/4)*gamma(3/4)/(105*pi*(x + 1)**(5/2
) + 105*pi*(x + 1)**2) + 64*(x + 1)**2*(sqrt(x + 1) + 1)**(3/4)*cos(7*atan((x + 1)**(1/4))/2)*gamma(1/4)*gamma
(3/4)/(105*pi*(x + 1)**(5/2) + 105*pi*(x + 1)**2) - 64*(x + 1)**2*gamma(1/4)*gamma(3/4)/(105*pi*(x + 1)**(5/2)
 + 105*pi*(x + 1)**2)

Maxima [C] (verification not implemented)

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

Time = 0.19 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.36 \[ \int \frac {1}{\sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {8}{7} \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {7}{2}} - \frac {24}{5} \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {5}{2}} + \frac {16}{3} \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {3}{2}} \]

[In]

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

[Out]

8/7*(sqrt(sqrt(x + 1) + 1) + 1)^(7/2) - 24/5*(sqrt(sqrt(x + 1) + 1) + 1)^(5/2) + 16/3*(sqrt(sqrt(x + 1) + 1) +
 1)^(3/2)

Giac [C] (verification not implemented)

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

Time = 0.31 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.62 \[ \int \frac {1}{\sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {8 \, {\left (15 \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {7}{2}} - 63 \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {5}{2}} + 70 \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {3}{2}}\right )}}{105 \, \mathrm {sgn}\left (4 \, {\left (\sqrt {x + 1} + 1\right )}^{2} - 8 \, \sqrt {x + 1} - 7\right ) \mathrm {sgn}\left (4 \, x + 1\right )} \]

[In]

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

[Out]

8/105*(15*(sqrt(sqrt(x + 1) + 1) + 1)^(7/2) - 63*(sqrt(sqrt(x + 1) + 1) + 1)^(5/2) + 70*(sqrt(sqrt(x + 1) + 1)
 + 1)^(3/2))/(sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7)*sgn(4*x + 1))

Mupad [F(-1)]

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

[In]

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

[Out]

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