3.714 \(\int \sqrt {2+\sqrt {4+\sqrt {x}}} \, dx\)

Optimal. Leaf size=64 \[ \frac {8}{9} \left (\sqrt {\sqrt {x}+4}+2\right )^{9/2}-\frac {48}{7} \left (\sqrt {\sqrt {x}+4}+2\right )^{7/2}+\frac {64}{5} \left (\sqrt {\sqrt {x}+4}+2\right )^{5/2} \]

[Out]

64/5*(2+(4+x^(1/2))^(1/2))^(5/2)-48/7*(2+(4+x^(1/2))^(1/2))^(7/2)+8/9*(2+(4+x^(1/2))^(1/2))^(9/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {371, 1398, 772} \[ \frac {8}{9} \left (\sqrt {\sqrt {x}+4}+2\right )^{9/2}-\frac {48}{7} \left (\sqrt {\sqrt {x}+4}+2\right )^{7/2}+\frac {64}{5} \left (\sqrt {\sqrt {x}+4}+2\right )^{5/2} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[2 + Sqrt[4 + Sqrt[x]]],x]

[Out]

(64*(2 + Sqrt[4 + Sqrt[x]])^(5/2))/5 - (48*(2 + Sqrt[4 + Sqrt[x]])^(7/2))/7 + (8*(2 + Sqrt[4 + Sqrt[x]])^(9/2)
)/9

Rule 371

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 772

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 1398

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*} \int \sqrt {2+\sqrt {4+\sqrt {x}}} \, dx &=2 \operatorname {Subst}\left (\int x \sqrt {2+\sqrt {4+x}} \, dx,x,\sqrt {x}\right )\\ &=2 \operatorname {Subst}\left (\int \sqrt {2+\sqrt {x}} (-4+x) \, dx,x,4+\sqrt {x}\right )\\ &=4 \operatorname {Subst}\left (\int x \sqrt {2+x} \left (-4+x^2\right ) \, dx,x,\sqrt {4+\sqrt {x}}\right )\\ &=4 \operatorname {Subst}\left (\int \left (8 (2+x)^{3/2}-6 (2+x)^{5/2}+(2+x)^{7/2}\right ) \, dx,x,\sqrt {4+\sqrt {x}}\right )\\ &=\frac {64}{5} \left (2+\sqrt {4+\sqrt {x}}\right )^{5/2}-\frac {48}{7} \left (2+\sqrt {4+\sqrt {x}}\right )^{7/2}+\frac {8}{9} \left (2+\sqrt {4+\sqrt {x}}\right )^{9/2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 43, normalized size = 0.67 \[ -\frac {8}{315} \left (\sqrt {\sqrt {x}+4}+2\right )^{5/2} \left (130 \sqrt {\sqrt {x}+4}-35 \sqrt {x}-244\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[2 + Sqrt[4 + Sqrt[x]]],x]

[Out]

(-8*(2 + Sqrt[4 + Sqrt[x]])^(5/2)*(-244 + 130*Sqrt[4 + Sqrt[x]] - 35*Sqrt[x]))/315

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 39, normalized size = 0.61 \[ \frac {8}{315} \, {\left (2 \, {\left (5 \, \sqrt {x} - 32\right )} \sqrt {\sqrt {x} + 4} + 35 \, x + 4 \, \sqrt {x} - 128\right )} \sqrt {\sqrt {\sqrt {x} + 4} + 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

8/315*(2*(5*sqrt(x) - 32)*sqrt(sqrt(x) + 4) + 35*x + 4*sqrt(x) - 128)*sqrt(sqrt(sqrt(x) + 4) + 2)

________________________________________________________________________________________

giac [B]  time = 7.65, size = 268, normalized size = 4.19 \[ \frac {8}{315} \, {\left ({\left (35 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {9}{2}} - 360 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {7}{2}} + 1512 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {5}{2}} - 3360 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {3}{2}} + 5040 \, \sqrt {\sqrt {\sqrt {x} + 4} + 2}\right )} \mathrm {sgn}\left (4 \, {\left (\sqrt {x} + 4\right )}^{2} - 32 \, \sqrt {x} - 79\right ) + 18 \, {\left (5 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {7}{2}} - 42 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {5}{2}} + 140 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {3}{2}} - 280 \, \sqrt {\sqrt {\sqrt {x} + 4} + 2}\right )} \mathrm {sgn}\left (4 \, {\left (\sqrt {x} + 4\right )}^{2} - 32 \, \sqrt {x} - 79\right ) - 84 \, {\left (3 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {5}{2}} - 20 \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {3}{2}} + 60 \, \sqrt {\sqrt {\sqrt {x} + 4} + 2}\right )} \mathrm {sgn}\left (4 \, {\left (\sqrt {x} + 4\right )}^{2} - 32 \, \sqrt {x} - 79\right ) - 840 \, {\left ({\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {3}{2}} - 6 \, \sqrt {\sqrt {\sqrt {x} + 4} + 2}\right )} \mathrm {sgn}\left (4 \, {\left (\sqrt {x} + 4\right )}^{2} - 32 \, \sqrt {x} - 79\right )\right )} \mathrm {sgn}\left (4 \, x - 15\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

8/315*((35*(sqrt(sqrt(x) + 4) + 2)^(9/2) - 360*(sqrt(sqrt(x) + 4) + 2)^(7/2) + 1512*(sqrt(sqrt(x) + 4) + 2)^(5
/2) - 3360*(sqrt(sqrt(x) + 4) + 2)^(3/2) + 5040*sqrt(sqrt(sqrt(x) + 4) + 2))*sgn(4*(sqrt(x) + 4)^2 - 32*sqrt(x
) - 79) + 18*(5*(sqrt(sqrt(x) + 4) + 2)^(7/2) - 42*(sqrt(sqrt(x) + 4) + 2)^(5/2) + 140*(sqrt(sqrt(x) + 4) + 2)
^(3/2) - 280*sqrt(sqrt(sqrt(x) + 4) + 2))*sgn(4*(sqrt(x) + 4)^2 - 32*sqrt(x) - 79) - 84*(3*(sqrt(sqrt(x) + 4)
+ 2)^(5/2) - 20*(sqrt(sqrt(x) + 4) + 2)^(3/2) + 60*sqrt(sqrt(sqrt(x) + 4) + 2))*sgn(4*(sqrt(x) + 4)^2 - 32*sqr
t(x) - 79) - 840*((sqrt(sqrt(x) + 4) + 2)^(3/2) - 6*sqrt(sqrt(sqrt(x) + 4) + 2))*sgn(4*(sqrt(x) + 4)^2 - 32*sq
rt(x) - 79))*sgn(4*x - 15)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 41, normalized size = 0.64 \[ \frac {64 \left (2+\sqrt {\sqrt {x}+4}\right )^{\frac {5}{2}}}{5}-\frac {48 \left (2+\sqrt {\sqrt {x}+4}\right )^{\frac {7}{2}}}{7}+\frac {8 \left (2+\sqrt {\sqrt {x}+4}\right )^{\frac {9}{2}}}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

64/5*(2+(x^(1/2)+4)^(1/2))^(5/2)-48/7*(2+(x^(1/2)+4)^(1/2))^(7/2)+8/9*(2+(x^(1/2)+4)^(1/2))^(9/2)

________________________________________________________________________________________

maxima [A]  time = 0.88, size = 40, normalized size = 0.62 \[ \frac {8}{9} \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {9}{2}} - \frac {48}{7} \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {7}{2}} + \frac {64}{5} \, {\left (\sqrt {\sqrt {x} + 4} + 2\right )}^{\frac {5}{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

8/9*(sqrt(sqrt(x) + 4) + 2)^(9/2) - 48/7*(sqrt(sqrt(x) + 4) + 2)^(7/2) + 64/5*(sqrt(sqrt(x) + 4) + 2)^(5/2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \sqrt {\sqrt {\sqrt {x}+4}+2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 2.51, size = 216, normalized size = 3.38 \[ - \frac {2 \sqrt {2} \sqrt {x} \sqrt {\sqrt {x} + 4} \sqrt {\sqrt {\sqrt {x} + 4} + 2} \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{63 \pi } - \frac {4 \sqrt {2} \sqrt {x} \sqrt {\sqrt {\sqrt {x} + 4} + 2} \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{315 \pi } - \frac {\sqrt {2} x \sqrt {\sqrt {\sqrt {x} + 4} + 2} \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{9 \pi } + \frac {64 \sqrt {2} \sqrt {\sqrt {x} + 4} \sqrt {\sqrt {\sqrt {x} + 4} + 2} \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{315 \pi } + \frac {128 \sqrt {2} \sqrt {\sqrt {\sqrt {x} + 4} + 2} \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{315 \pi } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*sqrt(2)*sqrt(x)*sqrt(sqrt(x) + 4)*sqrt(sqrt(sqrt(x) + 4) + 2)*gamma(-1/4)*gamma(1/4)/(63*pi) - 4*sqrt(2)*sq
rt(x)*sqrt(sqrt(sqrt(x) + 4) + 2)*gamma(-1/4)*gamma(1/4)/(315*pi) - sqrt(2)*x*sqrt(sqrt(sqrt(x) + 4) + 2)*gamm
a(-1/4)*gamma(1/4)/(9*pi) + 64*sqrt(2)*sqrt(sqrt(x) + 4)*sqrt(sqrt(sqrt(x) + 4) + 2)*gamma(-1/4)*gamma(1/4)/(3
15*pi) + 128*sqrt(2)*sqrt(sqrt(sqrt(x) + 4) + 2)*gamma(-1/4)*gamma(1/4)/(315*pi)

________________________________________________________________________________________