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

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

Optimal result

Integrand size = 43, antiderivative size = 184 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {88}{15} \sqrt {1+\sqrt {1+\sqrt {1+x}}}+\frac {8}{5} \sqrt {1+x} \sqrt {1+\sqrt {1+\sqrt {1+x}}}-\frac {32}{15} \sqrt {1+\sqrt {1+x}} \sqrt {1+\sqrt {1+\sqrt {1+x}}}-2 \sqrt {2 \left (1+\sqrt {2}\right )} \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {-1+\sqrt {2}}}\right )-2 \sqrt {2 \left (-1+\sqrt {2}\right )} \text {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right ) \]

[Out]

88/15*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)+8/5*(1+x)^(1/2)*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)-32/15*(1+(1+x)^(1/2))^(1
/2)*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)-2*(2+2*2^(1/2))^(1/2)*arctan((1+(1+(1+x)^(1/2))^(1/2))^(1/2)/(2^(1/2)-1)^(
1/2))-2*(-2+2*2^(1/2))^(1/2)*arctanh((1+(1+(1+x)^(1/2))^(1/2))^(1/2)/(1+2^(1/2))^(1/2))

Rubi [A] (verified)

Time = 1.18 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.88, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.140, Rules used = {1600, 912, 1301, 1107, 213, 209} \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=-2 \sqrt {2 \left (1+\sqrt {2}\right )} \arctan \left (\frac {\sqrt {\sqrt {\sqrt {x+1}+1}+1}}{\sqrt {\sqrt {2}-1}}\right )-2 \sqrt {2 \left (\sqrt {2}-1\right )} \text {arctanh}\left (\frac {\sqrt {\sqrt {\sqrt {x+1}+1}+1}}{\sqrt {1+\sqrt {2}}}\right )+\frac {8}{5} \left (\sqrt {\sqrt {x+1}+1}+1\right )^{5/2}-\frac {16}{3} \left (\sqrt {\sqrt {x+1}+1}+1\right )^{3/2}+8 \sqrt {\sqrt {\sqrt {x+1}+1}+1} \]

[In]

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

[Out]

8*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]] - (16*(1 + Sqrt[1 + Sqrt[1 + x]])^(3/2))/3 + (8*(1 + Sqrt[1 + Sqrt[1 + x]])^
(5/2))/5 - 2*Sqrt[2*(1 + Sqrt[2])]*ArcTan[Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]/Sqrt[-1 + Sqrt[2]]] - 2*Sqrt[2*(-1 +
 Sqrt[2])]*ArcTanh[Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]/Sqrt[1 + Sqrt[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 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 912

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> With[{q = De
nominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + g*(x^q/e))^n*((c*d^2 + a*e^2)/e^2 - 2*c*
d*(x^q/e^2) + c*(x^(2*q)/e^2))^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*
g, 0] && NeQ[c*d^2 + a*e^2, 0] && IntegersQ[n, p] && FractionQ[m]

Rule 1107

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 1301

Int[(((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.))/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Int[Ex
pandIntegrand[(f*x)^m*((d + e*x^2)^q/(a + b*x^2 + c*x^4)), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b^
2 - 4*a*c, 0] && IntegerQ[q] && IntegerQ[m]

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

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

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 144, normalized size of antiderivative = 0.78 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {8}{15} \left (11+3 \sqrt {1+x}-4 \sqrt {1+\sqrt {1+x}}\right ) \sqrt {1+\sqrt {1+\sqrt {1+x}}}-2 \sqrt {2 \left (1+\sqrt {2}\right )} \arctan \left (\sqrt {1+\sqrt {2}} \sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-2 \sqrt {2 \left (-1+\sqrt {2}\right )} \text {arctanh}\left (\sqrt {-1+\sqrt {2}} \sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \]

[In]

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

[Out]

(8*(11 + 3*Sqrt[1 + x] - 4*Sqrt[1 + Sqrt[1 + x]])*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]])/15 - 2*Sqrt[2*(1 + Sqrt[2])
]*ArcTan[Sqrt[1 + Sqrt[2]]*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]] - 2*Sqrt[2*(-1 + Sqrt[2])]*ArcTanh[Sqrt[-1 + Sqrt[
2]]*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]]

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.62

method result size
derivativedivides \(\frac {8 \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}+8 \sqrt {1+\sqrt {1+\sqrt {1+x}}}-\frac {2 \sqrt {2}\, \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {\sqrt {2}-1}}\right )}{\sqrt {\sqrt {2}-1}}-\frac {2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right )}{\sqrt {1+\sqrt {2}}}\) \(115\)
default \(\frac {8 \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}+8 \sqrt {1+\sqrt {1+\sqrt {1+x}}}-\frac {2 \sqrt {2}\, \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {\sqrt {2}-1}}\right )}{\sqrt {\sqrt {2}-1}}-\frac {2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right )}{\sqrt {1+\sqrt {2}}}\) \(115\)

[In]

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

[Out]

8/5*(1+(1+(1+x)^(1/2))^(1/2))^(5/2)-16/3*(1+(1+(1+x)^(1/2))^(1/2))^(3/2)+8*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)-2*2
^(1/2)/(2^(1/2)-1)^(1/2)*arctan((1+(1+(1+x)^(1/2))^(1/2))^(1/2)/(2^(1/2)-1)^(1/2))-2*2^(1/2)/(1+2^(1/2))^(1/2)
*arctanh((1+(1+(1+x)^(1/2))^(1/2))^(1/2)/(1+2^(1/2))^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.16 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=-\sqrt {2} \sqrt {\sqrt {2} - 1} \log \left (2 \, \sqrt {2} {\left (\sqrt {2} + 2\right )} \sqrt {\sqrt {2} - 1} + 4 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) + \sqrt {2} \sqrt {\sqrt {2} - 1} \log \left (-2 \, \sqrt {2} {\left (\sqrt {2} + 2\right )} \sqrt {\sqrt {2} - 1} + 4 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) + \frac {8}{15} \, {\left (3 \, \sqrt {x + 1} - 4 \, \sqrt {\sqrt {x + 1} + 1} + 11\right )} \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1} + \frac {1}{2} \, \sqrt {-8 \, \sqrt {2} - 8} \log \left ({\left (\sqrt {2} - 2\right )} \sqrt {-8 \, \sqrt {2} - 8} + 4 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) - \frac {1}{2} \, \sqrt {-8 \, \sqrt {2} - 8} \log \left (-{\left (\sqrt {2} - 2\right )} \sqrt {-8 \, \sqrt {2} - 8} + 4 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) \]

[In]

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

[Out]

-sqrt(2)*sqrt(sqrt(2) - 1)*log(2*sqrt(2)*(sqrt(2) + 2)*sqrt(sqrt(2) - 1) + 4*sqrt(sqrt(sqrt(x + 1) + 1) + 1))
+ sqrt(2)*sqrt(sqrt(2) - 1)*log(-2*sqrt(2)*(sqrt(2) + 2)*sqrt(sqrt(2) - 1) + 4*sqrt(sqrt(sqrt(x + 1) + 1) + 1)
) + 8/15*(3*sqrt(x + 1) - 4*sqrt(sqrt(x + 1) + 1) + 11)*sqrt(sqrt(sqrt(x + 1) + 1) + 1) + 1/2*sqrt(-8*sqrt(2)
- 8)*log((sqrt(2) - 2)*sqrt(-8*sqrt(2) - 8) + 4*sqrt(sqrt(sqrt(x + 1) + 1) + 1)) - 1/2*sqrt(-8*sqrt(2) - 8)*lo
g(-(sqrt(2) - 2)*sqrt(-8*sqrt(2) - 8) + 4*sqrt(sqrt(sqrt(x + 1) + 1) + 1))

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 253 vs. \(2 (126) = 252\).

Time = 8.39 (sec) , antiderivative size = 253, normalized size of antiderivative = 1.38 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=-\frac {\frac {30 \, \sqrt {2 \, \sqrt {2} + 2} \arctan \left (\frac {\sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}}{\sqrt {\sqrt {2} - 1}}\right )}{\mathrm {sgn}\left (4 \, {\left (\sqrt {x + 1} + 1\right )}^{2} - 8 \, \sqrt {x + 1} - 7\right )} + \frac {15 \, \sqrt {2 \, \sqrt {2} - 2} \log \left (\sqrt {\sqrt {2} + 1} + \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right )}{\mathrm {sgn}\left (4 \, {\left (\sqrt {x + 1} + 1\right )}^{2} - 8 \, \sqrt {x + 1} - 7\right )} - \frac {15 \, \sqrt {2 \, \sqrt {2} - 2} \log \left ({\left | -\sqrt {\sqrt {2} + 1} + \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1} \right |}\right )}{\mathrm {sgn}\left (4 \, {\left (\sqrt {x + 1} + 1\right )}^{2} - 8 \, \sqrt {x + 1} - 7\right )} - \frac {8 \, {\left (3 \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {5}{2}} - 10 \, {\left (\sqrt {\sqrt {x + 1} + 1} + 1\right )}^{\frac {3}{2}} + 15 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right )}}{\mathrm {sgn}\left (4 \, {\left (\sqrt {x + 1} + 1\right )}^{2} - 8 \, \sqrt {x + 1} - 7\right )}}{15 \, \mathrm {sgn}\left (4 \, x + 1\right )} \]

[In]

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

[Out]

-1/15*(30*sqrt(2*sqrt(2) + 2)*arctan(sqrt(sqrt(sqrt(x + 1) + 1) + 1)/sqrt(sqrt(2) - 1))/sgn(4*(sqrt(x + 1) + 1
)^2 - 8*sqrt(x + 1) - 7) + 15*sqrt(2*sqrt(2) - 2)*log(sqrt(sqrt(2) + 1) + sqrt(sqrt(sqrt(x + 1) + 1) + 1))/sgn
(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) - 15*sqrt(2*sqrt(2) - 2)*log(abs(-sqrt(sqrt(2) + 1) + sqrt(sqrt(sq
rt(x + 1) + 1) + 1)))/sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) - 8*(3*(sqrt(sqrt(x + 1) + 1) + 1)^(5/2)
- 10*(sqrt(sqrt(x + 1) + 1) + 1)^(3/2) + 15*sqrt(sqrt(sqrt(x + 1) + 1) + 1))/sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqr
t(x + 1) - 7))/sgn(4*x + 1)

Mupad [F(-1)]

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

[In]

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

[Out]

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