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

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

Optimal result

Integrand size = 43, antiderivative size = 213 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x^2 \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {5 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{2 \left (-1+\sqrt {1+x}\right ) \sqrt {1+\sqrt {1+x}}}-\frac {\left (1+\sqrt {1+\sqrt {1+x}}\right )^{5/2}}{2 \left (-1+\sqrt {1+x}\right ) \sqrt {1+\sqrt {1+x}}}-\frac {1}{4} \sqrt {17+25 \sqrt {2}} \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {-1+\sqrt {2}}}\right )+\text {arctanh}\left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\frac {1}{4} \sqrt {-17+25 \sqrt {2}} \text {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right ) \]

[Out]

5/2*(1+(1+(1+x)^(1/2))^(1/2))^(1/2)/(-1+(1+x)^(1/2))/(1+(1+x)^(1/2))^(1/2)-1/2*(1+(1+(1+x)^(1/2))^(1/2))^(5/2)
/(-1+(1+x)^(1/2))/(1+(1+x)^(1/2))^(1/2)-1/4*(17+25*2^(1/2))^(1/2)*arctan((1+(1+(1+x)^(1/2))^(1/2))^(1/2)/(2^(1
/2)-1)^(1/2))+arctanh((1+(1+(1+x)^(1/2))^(1/2))^(1/2))-1/4*(-17+25*2^(1/2))^(1/2)*arctanh((1+(1+(1+x)^(1/2))^(
1/2))^(1/2)/(1+2^(1/2))^(1/2))

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(432\) vs. \(2(213)=426\).

Time = 1.91 (sec) , antiderivative size = 432, normalized size of antiderivative = 2.03, number of steps used = 19, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.209, Rules used = {1600, 2127, 1608, 28, 2098, 213, 1192, 1180, 209} \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x^2 \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=-\frac {1}{60} \sqrt {10961+8989 \sqrt {2}} \arctan \left (\frac {\sqrt {\sqrt {\sqrt {x+1}+1}+1}}{\sqrt {\sqrt {2}-1}}\right )+\frac {1}{15} \sqrt {\frac {1}{2} \left (97+113 \sqrt {2}\right )} \arctan \left (\frac {\sqrt {\sqrt {\sqrt {x+1}+1}+1}}{\sqrt {\sqrt {2}-1}}\right )+\text {arctanh}\left (\sqrt {\sqrt {\sqrt {x+1}+1}+1}\right )-\frac {1}{60} \sqrt {8989 \sqrt {2}-10961} \text {arctanh}\left (\frac {\sqrt {\sqrt {\sqrt {x+1}+1}+1}}{\sqrt {1+\sqrt {2}}}\right )-\frac {1}{15} \sqrt {\frac {1}{2} \left (113 \sqrt {2}-97\right )} \text {arctanh}\left (\frac {\sqrt {\sqrt {\sqrt {x+1}+1}+1}}{\sqrt {1+\sqrt {2}}}\right )+\frac {8 \left (\sqrt {\sqrt {x+1}+1}+1\right )^{3/2}}{3 \left (1-\sqrt {x+1}\right ) \sqrt {\sqrt {x+1}+1}}-\frac {\left (50-17 \sqrt {\sqrt {x+1}+1}\right ) \sqrt {\sqrt {\sqrt {x+1}+1}+1}}{30 \left (1-\sqrt {x+1}\right )}-\frac {24 \sqrt {\sqrt {\sqrt {x+1}+1}+1}}{5 \left (1-\sqrt {x+1}\right ) \sqrt {\sqrt {x+1}+1}}-\frac {1}{30 \left (1-\sqrt {\sqrt {\sqrt {x+1}+1}+1}\right )}+\frac {1}{30 \left (\sqrt {\sqrt {\sqrt {x+1}+1}+1}+1\right )} \]

[In]

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

[Out]

(-24*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]])/(5*(1 - Sqrt[1 + x])*Sqrt[1 + Sqrt[1 + x]]) - ((50 - 17*Sqrt[1 + Sqrt[1
+ x]])*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]])/(30*(1 - Sqrt[1 + x])) + (8*(1 + Sqrt[1 + Sqrt[1 + x]])^(3/2))/(3*(1 -
 Sqrt[1 + x])*Sqrt[1 + Sqrt[1 + x]]) - 1/(30*(1 - Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]])) + 1/(30*(1 + Sqrt[1 + Sqrt
[1 + Sqrt[1 + x]]])) + (Sqrt[(97 + 113*Sqrt[2])/2]*ArcTan[Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]/Sqrt[-1 + Sqrt[2]]])
/15 - (Sqrt[10961 + 8989*Sqrt[2]]*ArcTan[Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]/Sqrt[-1 + Sqrt[2]]])/60 + ArcTanh[Sqr
t[1 + Sqrt[1 + Sqrt[1 + x]]]] - (Sqrt[(-97 + 113*Sqrt[2])/2]*ArcTanh[Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]/Sqrt[1 +
Sqrt[2]]])/15 - (Sqrt[-10961 + 8989*Sqrt[2]]*ArcTanh[Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]/Sqrt[1 + Sqrt[2]]])/60

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

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 1180

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

Rule 1192

Int[((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[x*(a*b*e - d*(b^2 - 2*a
*c) - c*(b*d - 2*a*e)*x^2)*((a + b*x^2 + c*x^4)^(p + 1)/(2*a*(p + 1)*(b^2 - 4*a*c))), x] + Dist[1/(2*a*(p + 1)
*(b^2 - 4*a*c)), Int[Simp[(2*p + 3)*d*b^2 - a*b*e - 2*a*c*d*(4*p + 5) + (4*p + 7)*(d*b - 2*a*e)*c*x^2, x]*(a +
 b*x^2 + c*x^4)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e
^2, 0] && LtQ[p, -1] && IntegerQ[2*p]

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]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2098

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P /. x -> Sqrt[x]]}, Int[ExpandIntegrand[(PP /. x ->
x^2)^p*Q^q, x], x] /;  !SumQ[NonfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x^2] && PolyQ[Q, x] && ILtQ[p,
 0]

Rule 2127

Int[(Pm_)*(Qn_)^(p_.), x_Symbol] :> With[{m = Expon[Pm, x], n = Expon[Qn, x]}, Simp[Coeff[Pm, x, m]*x^(m - n +
 1)*(Qn^(p + 1)/((m + n*p + 1)*Coeff[Qn, x, n])), x] + Dist[1/((m + n*p + 1)*Coeff[Qn, x, n]), Int[ExpandToSum
[(m + n*p + 1)*Coeff[Qn, x, n]*Pm - Coeff[Pm, x, m]*x^(m - n)*((m - n + 1)*Qn + (p + 1)*x*D[Qn, x]), x]*Qn^p,
x], x] /; LtQ[1, n, m + 1] && m + n*p + 1 < 0] /; FreeQ[p, x] && PolyQ[Pm, x] && PolyQ[Qn, x] && LtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {x^2 \sqrt {1+x}}{\left (-1+x^2\right )^2 \sqrt {1+\sqrt {1+x}}} \, dx,x,\sqrt {1+x}\right ) \\ & = 2 \text {Subst}\left (\int \frac {x^2}{(-1+x)^2 (1+x)^{3/2} \sqrt {1+\sqrt {1+x}}} \, dx,x,\sqrt {1+x}\right ) \\ & = 4 \text {Subst}\left (\int \frac {\left (-1+x^2\right )^2}{x^2 \sqrt {1+x} \left (-2+x^2\right )^2} \, dx,x,\sqrt {1+\sqrt {1+x}}\right ) \\ & = 4 \text {Subst}\left (\int \frac {(-1+x)^2 (1+x)^{3/2}}{x^2 \left (-2+x^2\right )^2} \, dx,x,\sqrt {1+\sqrt {1+x}}\right ) \\ & = 8 \text {Subst}\left (\int \frac {x^4 \left (-2+x^2\right )^2}{\left (1+x^2-3 x^4+x^6\right )^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = -\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8}{3} \text {Subst}\left (\int \frac {-3 x^2-13 x^4+9 x^6}{\left (1+x^2-3 x^4+x^6\right )^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = -\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8}{3} \text {Subst}\left (\int \frac {x^2 \left (-3-13 x^2+9 x^4\right )}{\left (1+x^2-3 x^4+x^6\right )^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = \frac {24 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{5 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}+\frac {8}{15} \text {Subst}\left (\int \frac {-9+24 x^2-16 x^4}{\left (1+x^2-3 x^4+x^6\right )^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = \frac {24 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{5 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {1}{30} \text {Subst}\left (\int \frac {\left (12-16 x^2\right )^2}{\left (1+x^2-3 x^4+x^6\right )^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = \frac {24 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{5 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {1}{30} \text {Subst}\left (\int \left (\frac {1}{(-1+x)^2}+\frac {1}{(1+x)^2}+\frac {30}{-1+x^2}+\frac {8 \left (25+8 x^2\right )}{\left (-1-2 x^2+x^4\right )^2}-\frac {4 \left (-7+8 x^2\right )}{-1-2 x^2+x^4}\right ) \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = -\frac {1}{30 \left (1-\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}+\frac {1}{30 \left (1+\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}+\frac {24 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{5 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}+\frac {2}{15} \text {Subst}\left (\int \frac {-7+8 x^2}{-1-2 x^2+x^4} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\frac {4}{15} \text {Subst}\left (\int \frac {25+8 x^2}{\left (-1-2 x^2+x^4\right )^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = -\frac {1}{30 \left (1-\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}+\frac {1}{30 \left (1+\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}-\frac {\left (50-17 \sqrt {1+\sqrt {1+x}}\right ) \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{30 \left (1+2 \left (1+\sqrt {1+\sqrt {1+x}}\right )-\left (1+\sqrt {1+\sqrt {1+x}}\right )^2\right )}+\frac {24 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{5 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}+\text {arctanh}\left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\frac {1}{60} \text {Subst}\left (\int \frac {-266+34 x^2}{-1-2 x^2+x^4} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )+\frac {1}{30} \left (16-\sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{-1+\sqrt {2}+x^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )+\frac {1}{30} \left (16+\sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{-1-\sqrt {2}+x^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = -\frac {1}{30 \left (1-\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}+\frac {1}{30 \left (1+\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}-\frac {\left (50-17 \sqrt {1+\sqrt {1+x}}\right ) \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{30 \left (1+2 \left (1+\sqrt {1+\sqrt {1+x}}\right )-\left (1+\sqrt {1+\sqrt {1+x}}\right )^2\right )}+\frac {24 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{5 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}+\frac {1}{30} \sqrt {194+226 \sqrt {2}} \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {-1+\sqrt {2}}}\right )+\text {arctanh}\left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\frac {1}{30} \sqrt {-194+226 \sqrt {2}} \text {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right )-\frac {1}{60} \left (17-58 \sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{-1-\sqrt {2}+x^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\frac {1}{60} \left (17+58 \sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{-1+\sqrt {2}+x^2} \, dx,x,\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right ) \\ & = -\frac {1}{30 \left (1-\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}+\frac {1}{30 \left (1+\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )}-\frac {\left (50-17 \sqrt {1+\sqrt {1+x}}\right ) \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{30 \left (1+2 \left (1+\sqrt {1+\sqrt {1+x}}\right )-\left (1+\sqrt {1+\sqrt {1+x}}\right )^2\right )}+\frac {24 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{5 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}-\frac {8 \left (1+\sqrt {1+\sqrt {1+x}}\right )^{3/2}}{3 \left (2+\sqrt {1+\sqrt {1+x}}-3 \left (1+\sqrt {1+\sqrt {1+x}}\right )^2+\left (1+\sqrt {1+\sqrt {1+x}}\right )^3\right )}+\frac {1}{30} \sqrt {194+226 \sqrt {2}} \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {-1+\sqrt {2}}}\right )-\frac {1}{60} \sqrt {10961+8989 \sqrt {2}} \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {-1+\sqrt {2}}}\right )+\text {arctanh}\left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\frac {1}{30} \sqrt {-194+226 \sqrt {2}} \text {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right )-\frac {1}{60} \sqrt {-10961+8989 \sqrt {2}} \text {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.81 (sec) , antiderivative size = 202, normalized size of antiderivative = 0.95 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x^2 \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{1-\sqrt {1+x}}+\frac {\left (3-\sqrt {1+x}\right ) \sqrt {1+\sqrt {1+x}} \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{2 x}-\frac {1}{4} \sqrt {17+25 \sqrt {2}} \arctan \left (\sqrt {1+\sqrt {2}} \sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )+\text {arctanh}\left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}\right )-\frac {1}{4} \sqrt {-17+25 \sqrt {2}} \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^2*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]),x]

[Out]

Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]/(1 - Sqrt[1 + x]) + ((3 - Sqrt[1 + x])*Sqrt[1 + Sqrt[1 + x]]*Sqrt[1 + Sqrt[1 +
 Sqrt[1 + x]]])/(2*x) - (Sqrt[17 + 25*Sqrt[2]]*ArcTan[Sqrt[1 + Sqrt[2]]*Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]])/4 +
ArcTanh[Sqrt[1 + Sqrt[1 + Sqrt[1 + x]]]] - (Sqrt[-17 + 25*Sqrt[2]]*ArcTanh[Sqrt[-1 + Sqrt[2]]*Sqrt[1 + Sqrt[1
+ Sqrt[1 + x]]]])/4

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.01

method result size
derivativedivides \(-\frac {1}{2 \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}-1\right )}-\frac {\ln \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}-1\right )}{2}+\frac {\frac {\left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {3}{2}}}{2}-\frac {3 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{2}}{\left (1+\sqrt {1+\sqrt {1+x}}\right )^{2}-2 \sqrt {1+\sqrt {1+x}}-3}-\frac {\sqrt {2}\, \left (8+\sqrt {2}\right ) \operatorname {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right )}{8 \sqrt {1+\sqrt {2}}}+\frac {\left (-8+\sqrt {2}\right ) \sqrt {2}\, \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {\sqrt {2}-1}}\right )}{8 \sqrt {\sqrt {2}-1}}-\frac {1}{2 \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}+1\right )}+\frac {\ln \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}+1\right )}{2}\) \(215\)
default \(-\frac {1}{2 \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}-1\right )}-\frac {\ln \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}-1\right )}{2}+\frac {\frac {\left (1+\sqrt {1+\sqrt {1+x}}\right )^{\frac {3}{2}}}{2}-\frac {3 \sqrt {1+\sqrt {1+\sqrt {1+x}}}}{2}}{\left (1+\sqrt {1+\sqrt {1+x}}\right )^{2}-2 \sqrt {1+\sqrt {1+x}}-3}-\frac {\sqrt {2}\, \left (8+\sqrt {2}\right ) \operatorname {arctanh}\left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {1+\sqrt {2}}}\right )}{8 \sqrt {1+\sqrt {2}}}+\frac {\left (-8+\sqrt {2}\right ) \sqrt {2}\, \arctan \left (\frac {\sqrt {1+\sqrt {1+\sqrt {1+x}}}}{\sqrt {\sqrt {2}-1}}\right )}{8 \sqrt {\sqrt {2}-1}}-\frac {1}{2 \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}+1\right )}+\frac {\ln \left (\sqrt {1+\sqrt {1+\sqrt {1+x}}}+1\right )}{2}\) \(215\)

[In]

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

[Out]

-1/2/((1+(1+(1+x)^(1/2))^(1/2))^(1/2)-1)-1/2*ln((1+(1+(1+x)^(1/2))^(1/2))^(1/2)-1)+2*(1/4*(1+(1+(1+x)^(1/2))^(
1/2))^(3/2)-3/4*(1+(1+(1+x)^(1/2))^(1/2))^(1/2))/((1+(1+(1+x)^(1/2))^(1/2))^2-2*(1+(1+x)^(1/2))^(1/2)-3)-1/8*2
^(1/2)*(8+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))+1/8*(-8+2^(1/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))-1/2/((1+(1+(1+x)^(1/2))
^(1/2))^(1/2)+1)+1/2*ln((1+(1+(1+x)^(1/2))^(1/2))^(1/2)+1)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.26 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x^2 \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=-\frac {x \sqrt {25 \, \sqrt {2} - 17} \log \left (\sqrt {25 \, \sqrt {2} - 17} {\left (3 \, \sqrt {2} + 7\right )} + 31 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) - x \sqrt {25 \, \sqrt {2} - 17} \log \left (-\sqrt {25 \, \sqrt {2} - 17} {\left (3 \, \sqrt {2} + 7\right )} + 31 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) - x \sqrt {-25 \, \sqrt {2} - 17} \log \left ({\left (3 \, \sqrt {2} - 7\right )} \sqrt {-25 \, \sqrt {2} - 17} + 31 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) + x \sqrt {-25 \, \sqrt {2} - 17} \log \left (-{\left (3 \, \sqrt {2} - 7\right )} \sqrt {-25 \, \sqrt {2} - 17} + 31 \, \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}\right ) - 4 \, x \log \left (\sqrt {\sqrt {\sqrt {x + 1} + 1} + 1} + 1\right ) + 4 \, x \log \left (\sqrt {\sqrt {\sqrt {x + 1} + 1} + 1} - 1\right ) + 4 \, {\left (\sqrt {\sqrt {x + 1} + 1} {\left (\sqrt {x + 1} - 3\right )} + 2 \, \sqrt {x + 1} + 2\right )} \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}}{8 \, x} \]

[In]

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

[Out]

-1/8*(x*sqrt(25*sqrt(2) - 17)*log(sqrt(25*sqrt(2) - 17)*(3*sqrt(2) + 7) + 31*sqrt(sqrt(sqrt(x + 1) + 1) + 1))
- x*sqrt(25*sqrt(2) - 17)*log(-sqrt(25*sqrt(2) - 17)*(3*sqrt(2) + 7) + 31*sqrt(sqrt(sqrt(x + 1) + 1) + 1)) - x
*sqrt(-25*sqrt(2) - 17)*log((3*sqrt(2) - 7)*sqrt(-25*sqrt(2) - 17) + 31*sqrt(sqrt(sqrt(x + 1) + 1) + 1)) + x*s
qrt(-25*sqrt(2) - 17)*log(-(3*sqrt(2) - 7)*sqrt(-25*sqrt(2) - 17) + 31*sqrt(sqrt(sqrt(x + 1) + 1) + 1)) - 4*x*
log(sqrt(sqrt(sqrt(x + 1) + 1) + 1) + 1) + 4*x*log(sqrt(sqrt(sqrt(x + 1) + 1) + 1) - 1) + 4*(sqrt(sqrt(x + 1)
+ 1)*(sqrt(x + 1) - 3) + 2*sqrt(x + 1) + 2)*sqrt(sqrt(sqrt(x + 1) + 1) + 1))/x

Sympy [F(-1)]

Timed out. \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x^2 \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**2/(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^2 \sqrt {1+\sqrt {1+\sqrt {1+x}}}} \, dx=\int { \frac {\sqrt {x + 1} \sqrt {\sqrt {x + 1} + 1}}{x^{2} \sqrt {\sqrt {\sqrt {x + 1} + 1} + 1}} \,d x } \]

[In]

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

[Out]

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

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

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

[In]

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

[Out]

3/4*(sqrt(2*sqrt(2) - 2)*arctan(sqrt(sqrt(1/2*sqrt(3) + 1) + 1)/sqrt(sqrt(2) - 1)) - I*sqrt(2*sqrt(2) + 2)*arc
tan(sqrt(sqrt(1/2*sqrt(3) + 1) + 1)/sqrt(-sqrt(2) - 1)))*sgn(4*x + 1) - 1/4*((7*I*sqrt(sqrt(2) + 1)*abs(sgn(4*
(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7))*sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) - 3*I*sqrt(2*sqrt(2)
+ 2))*arctan(sqrt(sqrt(sqrt(x + 1) + 1) + 1)/sqrt(-(sqrt(2)*sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) + s
gn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7))/sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7)))/abs(sgn(4*(sqr
t(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7)) + (7*sqrt(sqrt(2) - 1)*abs(sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7
))*sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) + 3*sqrt(2*sqrt(2) - 2))*arctan(sqrt(sqrt(sqrt(x + 1) + 1) +
 1)/sqrt((sqrt(2)*sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) - sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) -
 7))/sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7)))/abs(sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7)) - 2*
log(sqrt(sqrt(sqrt(x + 1) + 1) + 1) + 1)/sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) + 2*log(abs(sqrt(sqrt(
sqrt(x + 1) + 1) + 1) - 1))/sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7) + 2*((sqrt(sqrt(x + 1) + 1) + 1)^(5
/2) - 5*sqrt(sqrt(sqrt(x + 1) + 1) + 1))/(((sqrt(sqrt(x + 1) + 1) + 1)^3 - 3*(sqrt(sqrt(x + 1) + 1) + 1)^2 + s
qrt(sqrt(x + 1) + 1) + 2)*sgn(4*(sqrt(x + 1) + 1)^2 - 8*sqrt(x + 1) - 7)))/sgn(4*x + 1)

Mupad [F(-1)]

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

[In]

int((((x + 1)^(1/2) + 1)^(1/2)*(x + 1)^(1/2))/(x^2*(((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^2*(((x + 1)^(1/2) + 1)^(1/2) + 1)^(1/2)), x)