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

Optimal. Leaf size=62 \[ -\frac {8 \left (1187-4 x+175 x^2\right ) \sqrt {1+\sqrt {1+x}}}{3465}+\frac {4 \sqrt {1+x} \left (1091+40 x+315 x^2\right ) \sqrt {1+\sqrt {1+x}}}{3465} \]

[Out]

-8/3465*(175*x^2-4*x+1187)*(1+(1+x)^(1/2))^(1/2)+4/3465*(1+x)^(1/2)*(315*x^2+40*x+1091)*(1+(1+x)^(1/2))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 101, normalized size of antiderivative = 1.63, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {1914, 1634} \begin {gather*} \frac {4}{11} \left (\sqrt {x+1}+1\right )^{11/2}-\frac {20}{9} \left (\sqrt {x+1}+1\right )^{9/2}+\frac {32}{7} \left (\sqrt {x+1}+1\right )^{7/2}-\frac {16}{5} \left (\sqrt {x+1}+1\right )^{5/2}+\frac {4}{3} \left (\sqrt {x+1}+1\right )^{3/2}-4 \sqrt {\sqrt {x+1}+1} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-4*Sqrt[1 + Sqrt[1 + x]] + (4*(1 + Sqrt[1 + x])^(3/2))/3 - (16*(1 + Sqrt[1 + x])^(5/2))/5 + (32*(1 + Sqrt[1 +
x])^(7/2))/7 - (20*(1 + Sqrt[1 + x])^(9/2))/9 + (4*(1 + Sqrt[1 + x])^(11/2))/11

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 1914

Int[(Px_)^(q_.)*((a_.) + (b_.)*((c_) + (d_.)*(x_))^(n_))^(p_), x_Symbol] :> With[{k = Denominator[n]}, Dist[k/
d, Subst[Int[SimplifyIntegrand[x^(k - 1)*(Px /. x -> x^k/d - c/d)^q*(a + b*x^(k*n))^p, x], x], x, (c + d*x)^(1
/k)], x]] /; FreeQ[{a, b, c, d, p}, x] && PolynomialQ[Px, x] && IntegerQ[q] && FractionQ[n]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 58, normalized size = 0.94 \begin {gather*} \frac {4 \sqrt {1+\sqrt {1+x}} \left (-2732+1366 \sqrt {1+x}+708 (1+x)-590 (1+x)^{3/2}-350 (1+x)^2+315 (1+x)^{5/2}\right )}{3465} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4*Sqrt[1 + Sqrt[1 + x]]*(-2732 + 1366*Sqrt[1 + x] + 708*(1 + x) - 590*(1 + x)^(3/2) - 350*(1 + x)^2 + 315*(1
+ x)^(5/2)))/3465

________________________________________________________________________________________

Maple [A]
time = 0.32, size = 68, normalized size = 1.10

method result size
meijerg \(\frac {\sqrt {2}\, x \hypergeom \left (\left [\frac {1}{4}, \frac {3}{4}, 1\right ], \left [\frac {3}{2}, 2\right ], -x \right )}{2}+\frac {\sqrt {2}\, x^{3} \hypergeom \left (\left [\frac {1}{4}, \frac {3}{4}, 3\right ], \left [\frac {3}{2}, 4\right ], -x \right )}{6}\) \(38\)
derivativedivides \(\frac {4 \left (1+\sqrt {1+x}\right )^{\frac {11}{2}}}{11}-\frac {20 \left (1+\sqrt {1+x}\right )^{\frac {9}{2}}}{9}+\frac {32 \left (1+\sqrt {1+x}\right )^{\frac {7}{2}}}{7}-\frac {16 \left (1+\sqrt {1+x}\right )^{\frac {5}{2}}}{5}+\frac {4 \left (1+\sqrt {1+x}\right )^{\frac {3}{2}}}{3}-4 \sqrt {1+\sqrt {1+x}}\) \(68\)
default \(\frac {4 \left (1+\sqrt {1+x}\right )^{\frac {11}{2}}}{11}-\frac {20 \left (1+\sqrt {1+x}\right )^{\frac {9}{2}}}{9}+\frac {32 \left (1+\sqrt {1+x}\right )^{\frac {7}{2}}}{7}-\frac {16 \left (1+\sqrt {1+x}\right )^{\frac {5}{2}}}{5}+\frac {4 \left (1+\sqrt {1+x}\right )^{\frac {3}{2}}}{3}-4 \sqrt {1+\sqrt {1+x}}\) \(68\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4/11*(1+(1+x)^(1/2))^(11/2)-20/9*(1+(1+x)^(1/2))^(9/2)+32/7*(1+(1+x)^(1/2))^(7/2)-16/5*(1+(1+x)^(1/2))^(5/2)+4
/3*(1+(1+x)^(1/2))^(3/2)-4*(1+(1+x)^(1/2))^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 67, normalized size = 1.08 \begin {gather*} \frac {4}{11} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {11}{2}} - \frac {20}{9} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {9}{2}} + \frac {32}{7} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {7}{2}} - \frac {16}{5} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {5}{2}} + \frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} - 4 \, \sqrt {\sqrt {x + 1} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4/11*(sqrt(x + 1) + 1)^(11/2) - 20/9*(sqrt(x + 1) + 1)^(9/2) + 32/7*(sqrt(x + 1) + 1)^(7/2) - 16/5*(sqrt(x + 1
) + 1)^(5/2) + 4/3*(sqrt(x + 1) + 1)^(3/2) - 4*sqrt(sqrt(x + 1) + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 38, normalized size = 0.61 \begin {gather*} -\frac {4}{3465} \, {\left (350 \, x^{2} - {\left (315 \, x^{2} + 40 \, x + 1091\right )} \sqrt {x + 1} - 8 \, x + 2374\right )} \sqrt {\sqrt {x + 1} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4/3465*(350*x^2 - (315*x^2 + 40*x + 1091)*sqrt(x + 1) - 8*x + 2374)*sqrt(sqrt(x + 1) + 1)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 6166 vs. \(2 (58) = 116\).
time = 3.26, size = 6166, normalized size = 99.45 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4900*x**(39/2)*(x + 1)**(3/4)*cos(11*atan(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(
33/2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x
**(23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*
x**(13/2) + 3465*pi*x**(11/2)) + 45632*x**(37/2)*(x + 1)**(3/4)*cos(11*atan(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/
(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2
744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2)
 + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) + 183352*x**(35/2)*(x + 1)**(3/4)*cos(11*atan
(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*pi*x
**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715175
*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) + 512*x**(
35/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2
) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**
(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) + 406048*x**(33/2
)*(x + 1)**(3/4)*cos(11*atan(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 22869
0*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 27
44280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3
465*pi*x**(11/2)) + 6144*x**(33/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x
**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*
pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi
*x**(11/2)) + 511148*x**(31/2)*(x + 1)**(3/4)*cos(11*atan(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2)
 + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2
) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(1
5/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) + 33792*x**(31/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41
580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3
201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2)
+ 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) + 299200*x**(29/2)*(x + 1)**(3/4)*cos(11*atan(sqrt(x))/2)*gamma(1/4)
*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x
**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*
pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) + 112640*x**(29/2)*gamma(1/4)*gam
ma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(2
7/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x
**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) - 56496*x**(27/2)*(x + 1)**(3/4)*cos(
11*atan(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 7623
00*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) +
1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) + 2
53440*x**(27/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x**(31/2) + 762300*p
i*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2) + 2744280*pi*x**(21/2) + 1715
175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/2) + 3465*pi*x**(11/2)) - 15417
6*x**(25/2)*(x + 1)**(3/4)*cos(11*atan(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/
2) + 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(
23/2) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**
(13/2) + 3465*pi*x**(11/2)) + 405504*x**(25/2)*gamma(1/4)*gamma(3/4)/(3465*pi*x**(35/2) + 41580*pi*x**(33/2) +
 228690*pi*x**(31/2) + 762300*pi*x**(29/2) + 1715175*pi*x**(27/2) + 2744280*pi*x**(25/2) + 3201660*pi*x**(23/2
) + 2744280*pi*x**(21/2) + 1715175*pi*x**(19/2) + 762300*pi*x**(17/2) + 228690*pi*x**(15/2) + 41580*pi*x**(13/
2) + 3465*pi*x**(11/2)) + 61116*x**(23/2)*(x + 1)**(3/4)*cos(11*atan(sqrt(x))/2)*gamma(1/4)*gamma(3/4)/(3465*p
i*x**(35/2) + 41580*pi*x**(33/2) + 228690*pi*x*...

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 67, normalized size = 1.08 \begin {gather*} \frac {4}{11} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {11}{2}} - \frac {20}{9} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {9}{2}} + \frac {32}{7} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {7}{2}} - \frac {16}{5} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {5}{2}} + \frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} - 4 \, \sqrt {\sqrt {x + 1} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4/11*(sqrt(x + 1) + 1)^(11/2) - 20/9*(sqrt(x + 1) + 1)^(9/2) + 32/7*(sqrt(x + 1) + 1)^(7/2) - 16/5*(sqrt(x + 1
) + 1)^(5/2) + 4/3*(sqrt(x + 1) + 1)^(3/2) - 4*sqrt(sqrt(x + 1) + 1)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {x^2+1}{\sqrt {\sqrt {x+1}+1}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________