3.19.88 \(\int \frac {\sqrt {1+x}}{1+\sqrt {x+\sqrt {1+x}}} \, dx\)

Optimal. Leaf size=130 \[ \sqrt {x+1} \left (\sqrt {x+\sqrt {x+1}}-2\right )-\frac {3}{2} \sqrt {x+\sqrt {x+1}}-\frac {23}{4} \log \left (2 \sqrt {x+1}-2 \sqrt {x+\sqrt {x+1}}+1\right )-\frac {4}{3} \log \left (\sqrt {x+1}-\sqrt {x+\sqrt {x+1}}-2\right )+\frac {16}{3} \log \left (\sqrt {x+1}-\sqrt {x+\sqrt {x+1}}+1\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 182, normalized size of antiderivative = 1.40, number of steps used = 18, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {6742, 612, 621, 206, 734, 843, 724} \begin {gather*} \frac {1}{2} \sqrt {x+\sqrt {x+1}} \left (2 \sqrt {x+1}+1\right )-2 \sqrt {x+1}-2 \sqrt {x+\sqrt {x+1}}-\frac {2}{3} \log \left (1-\sqrt {x+1}\right )+\frac {8}{3} \log \left (\sqrt {x+1}+2\right )+\frac {2}{3} \tanh ^{-1}\left (\frac {1-3 \sqrt {x+1}}{2 \sqrt {x+\sqrt {x+1}}}\right )+\frac {15}{4} \tanh ^{-1}\left (\frac {2 \sqrt {x+1}+1}{2 \sqrt {x+\sqrt {x+1}}}\right )-\frac {8}{3} \tanh ^{-1}\left (\frac {3 \sqrt {x+1}+4}{2 \sqrt {x+\sqrt {x+1}}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-2*Sqrt[1 + x] - 2*Sqrt[x + Sqrt[1 + x]] + (Sqrt[x + Sqrt[1 + x]]*(1 + 2*Sqrt[1 + x]))/2 + (2*ArcTanh[(1 - 3*S
qrt[1 + x])/(2*Sqrt[x + Sqrt[1 + x]])])/3 + (15*ArcTanh[(1 + 2*Sqrt[1 + x])/(2*Sqrt[x + Sqrt[1 + x]])])/4 - (8
*ArcTanh[(4 + 3*Sqrt[1 + x])/(2*Sqrt[x + Sqrt[1 + x]])])/3 - (2*Log[1 - Sqrt[1 + x]])/3 + (8*Log[2 + Sqrt[1 +
x]])/3

Rule 206

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

Rule 612

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

Rule 621

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

Rule 724

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

Rule 734

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m + 1)*(
a + b*x + c*x^2)^p)/(e*(m + 2*p + 1)), x] - Dist[p/(e*(m + 2*p + 1)), Int[(d + e*x)^m*Simp[b*d - 2*a*e + (2*c*
d - b*e)*x, x]*(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !RationalQ[m] || Lt
Q[m, 1]) &&  !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, b, c, d, e, m, p, x]

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {\sqrt {1+x}}{1+\sqrt {x+\sqrt {1+x}}} \, dx &=2 \operatorname {Subst}\left (\int \frac {x^2}{1+\sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )\\ &=2 \operatorname {Subst}\left (\int \left (-1-\frac {1}{3 (-1+x)}+\frac {4}{3 (2+x)}+\sqrt {-1+x+x^2}+\frac {\sqrt {-1+x+x^2}}{3 (-1+x)}-\frac {4 \sqrt {-1+x+x^2}}{3 (2+x)}\right ) \, dx,x,\sqrt {1+x}\right )\\ &=-2 \sqrt {1+x}-\frac {2}{3} \log \left (1-\sqrt {1+x}\right )+\frac {8}{3} \log \left (2+\sqrt {1+x}\right )+\frac {2}{3} \operatorname {Subst}\left (\int \frac {\sqrt {-1+x+x^2}}{-1+x} \, dx,x,\sqrt {1+x}\right )+2 \operatorname {Subst}\left (\int \sqrt {-1+x+x^2} \, dx,x,\sqrt {1+x}\right )-\frac {8}{3} \operatorname {Subst}\left (\int \frac {\sqrt {-1+x+x^2}}{2+x} \, dx,x,\sqrt {1+x}\right )\\ &=-2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}+\frac {1}{2} \sqrt {x+\sqrt {1+x}} \left (1+2 \sqrt {1+x}\right )-\frac {2}{3} \log \left (1-\sqrt {1+x}\right )+\frac {8}{3} \log \left (2+\sqrt {1+x}\right )-\frac {1}{3} \operatorname {Subst}\left (\int \frac {1-3 x}{(-1+x) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )-\frac {5}{4} \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )+\frac {4}{3} \operatorname {Subst}\left (\int \frac {4+3 x}{(2+x) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )\\ &=-2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}+\frac {1}{2} \sqrt {x+\sqrt {1+x}} \left (1+2 \sqrt {1+x}\right )-\frac {2}{3} \log \left (1-\sqrt {1+x}\right )+\frac {8}{3} \log \left (2+\sqrt {1+x}\right )+\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )-\frac {5}{2} \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {1+2 \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )-\frac {8}{3} \operatorname {Subst}\left (\int \frac {1}{(2+x) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )+4 \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )+\operatorname {Subst}\left (\int \frac {1}{\sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )\\ &=-2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}+\frac {1}{2} \sqrt {x+\sqrt {1+x}} \left (1+2 \sqrt {1+x}\right )-\frac {5}{4} \tanh ^{-1}\left (\frac {1+2 \sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )-\frac {2}{3} \log \left (1-\sqrt {1+x}\right )+\frac {8}{3} \log \left (2+\sqrt {1+x}\right )-\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {-1+3 \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )+2 \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {1+2 \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )+\frac {16}{3} \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {-4-3 \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )+8 \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {1+2 \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )\\ &=-2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}+\frac {1}{2} \sqrt {x+\sqrt {1+x}} \left (1+2 \sqrt {1+x}\right )+\frac {2}{3} \tanh ^{-1}\left (\frac {1-3 \sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )+\frac {15}{4} \tanh ^{-1}\left (\frac {1+2 \sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )-\frac {8}{3} \tanh ^{-1}\left (\frac {4+3 \sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )-\frac {2}{3} \log \left (1-\sqrt {1+x}\right )+\frac {8}{3} \log \left (2+\sqrt {1+x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 170, normalized size = 1.31 \begin {gather*} \frac {1}{12} \left (-24 \sqrt {x+1}+12 \sqrt {x+1} \sqrt {x+\sqrt {x+1}}-18 \sqrt {x+\sqrt {x+1}}-8 \log \left (1-\sqrt {x+1}\right )+32 \log \left (\sqrt {x+1}+2\right )+8 \tanh ^{-1}\left (\frac {1-3 \sqrt {x+1}}{2 \sqrt {x+\sqrt {x+1}}}\right )+45 \tanh ^{-1}\left (\frac {2 \sqrt {x+1}+1}{2 \sqrt {x+\sqrt {x+1}}}\right )-32 \tanh ^{-1}\left (\frac {3 \sqrt {x+1}+4}{2 \sqrt {x+\sqrt {x+1}}}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-24*Sqrt[1 + x] - 18*Sqrt[x + Sqrt[1 + x]] + 12*Sqrt[1 + x]*Sqrt[x + Sqrt[1 + x]] + 8*ArcTanh[(1 - 3*Sqrt[1 +
 x])/(2*Sqrt[x + Sqrt[1 + x]])] + 45*ArcTanh[(1 + 2*Sqrt[1 + x])/(2*Sqrt[x + Sqrt[1 + x]])] - 32*ArcTanh[(4 +
3*Sqrt[1 + x])/(2*Sqrt[x + Sqrt[1 + x]])] - 8*Log[1 - Sqrt[1 + x]] + 32*Log[2 + Sqrt[1 + x]])/12

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.34, size = 127, normalized size = 0.98 \begin {gather*} -2 \sqrt {1+x}+\frac {1}{2} \sqrt {x+\sqrt {1+x}} \left (-3+2 \sqrt {1+x}\right )+\frac {16}{3} \log \left (-1-\sqrt {1+x}+\sqrt {x+\sqrt {1+x}}\right )-\frac {4}{3} \log \left (2-\sqrt {1+x}+\sqrt {x+\sqrt {1+x}}\right )-\frac {23}{4} \log \left (-1-2 \sqrt {1+x}+2 \sqrt {x+\sqrt {1+x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[Sqrt[1 + x]/(1 + Sqrt[x + Sqrt[1 + x]]),x]

[Out]

-2*Sqrt[1 + x] + (Sqrt[x + Sqrt[1 + x]]*(-3 + 2*Sqrt[1 + x]))/2 + (16*Log[-1 - Sqrt[1 + x] + Sqrt[x + Sqrt[1 +
 x]]])/3 - (4*Log[2 - Sqrt[1 + x] + Sqrt[x + Sqrt[1 + x]]])/3 - (23*Log[-1 - 2*Sqrt[1 + x] + 2*Sqrt[x + Sqrt[1
 + x]]])/4

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

giac [A]  time = 0.73, size = 157, normalized size = 1.21 \begin {gather*} \frac {1}{2} \, \sqrt {x + \sqrt {x + 1}} {\left (2 \, \sqrt {x + 1} - 3\right )} - 2 \, \sqrt {x + 1} - \frac {8}{3} \, \log \left (-\sqrt {x + \sqrt {x + 1}} + \sqrt {x + 1} + 3\right ) + \frac {8}{3} \, \log \left (-\sqrt {x + \sqrt {x + 1}} + \sqrt {x + 1} + 1\right ) - \frac {15}{4} \, \log \left (-2 \, \sqrt {x + \sqrt {x + 1}} + 2 \, \sqrt {x + 1} + 1\right ) + \frac {8}{3} \, \log \left (\sqrt {x + 1} + 2\right ) - \frac {2}{3} \, \log \left ({\left | \sqrt {x + \sqrt {x + 1}} - \sqrt {x + 1} + 2 \right |}\right ) + \frac {2}{3} \, \log \left ({\left | \sqrt {x + \sqrt {x + 1}} - \sqrt {x + 1} \right |}\right ) - \frac {2}{3} \, \log \left ({\left | \sqrt {x + 1} - 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*sqrt(x + sqrt(x + 1))*(2*sqrt(x + 1) - 3) - 2*sqrt(x + 1) - 8/3*log(-sqrt(x + sqrt(x + 1)) + sqrt(x + 1) +
 3) + 8/3*log(-sqrt(x + sqrt(x + 1)) + sqrt(x + 1) + 1) - 15/4*log(-2*sqrt(x + sqrt(x + 1)) + 2*sqrt(x + 1) +
1) + 8/3*log(sqrt(x + 1) + 2) - 2/3*log(abs(sqrt(x + sqrt(x + 1)) - sqrt(x + 1) + 2)) + 2/3*log(abs(sqrt(x + s
qrt(x + 1)) - sqrt(x + 1))) - 2/3*log(abs(sqrt(x + 1) - 1))

________________________________________________________________________________________

maple [B]  time = 0.08, size = 238, normalized size = 1.83

method result size
derivativedivides \(\frac {\left (2 \sqrt {1+x}+1\right ) \sqrt {x +\sqrt {1+x}}}{2}-\frac {5 \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {x +\sqrt {1+x}}\right )}{4}+\frac {2 \sqrt {\left (-1+\sqrt {1+x}\right )^{2}+3 \sqrt {1+x}-2}}{3}+\ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (-1+\sqrt {1+x}\right )^{2}+3 \sqrt {1+x}-2}\right )-\frac {2 \arctanh \left (\frac {-1+3 \sqrt {1+x}}{2 \sqrt {\left (-1+\sqrt {1+x}\right )^{2}+3 \sqrt {1+x}-2}}\right )}{3}-\frac {8 \sqrt {\left (\sqrt {1+x}+2\right )^{2}-3 \sqrt {1+x}-5}}{3}+4 \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (\sqrt {1+x}+2\right )^{2}-3 \sqrt {1+x}-5}\right )+\frac {8 \arctanh \left (\frac {-4-3 \sqrt {1+x}}{2 \sqrt {\left (\sqrt {1+x}+2\right )^{2}-3 \sqrt {1+x}-5}}\right )}{3}-2 \sqrt {1+x}-\frac {2 \ln \left (-1+\sqrt {1+x}\right )}{3}+\frac {8 \ln \left (\sqrt {1+x}+2\right )}{3}\) \(238\)
default \(\frac {\left (2 \sqrt {1+x}+1\right ) \sqrt {x +\sqrt {1+x}}}{2}-\frac {5 \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {x +\sqrt {1+x}}\right )}{4}+\frac {2 \sqrt {\left (-1+\sqrt {1+x}\right )^{2}+3 \sqrt {1+x}-2}}{3}+\ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (-1+\sqrt {1+x}\right )^{2}+3 \sqrt {1+x}-2}\right )-\frac {2 \arctanh \left (\frac {-1+3 \sqrt {1+x}}{2 \sqrt {\left (-1+\sqrt {1+x}\right )^{2}+3 \sqrt {1+x}-2}}\right )}{3}-\frac {8 \sqrt {\left (\sqrt {1+x}+2\right )^{2}-3 \sqrt {1+x}-5}}{3}+4 \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (\sqrt {1+x}+2\right )^{2}-3 \sqrt {1+x}-5}\right )+\frac {8 \arctanh \left (\frac {-4-3 \sqrt {1+x}}{2 \sqrt {\left (\sqrt {1+x}+2\right )^{2}-3 \sqrt {1+x}-5}}\right )}{3}-2 \sqrt {1+x}-\frac {2 \ln \left (-1+\sqrt {1+x}\right )}{3}+\frac {8 \ln \left (\sqrt {1+x}+2\right )}{3}\) \(238\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(2*(1+x)^(1/2)+1)*(x+(1+x)^(1/2))^(1/2)-5/4*ln(1/2+(1+x)^(1/2)+(x+(1+x)^(1/2))^(1/2))+2/3*((-1+(1+x)^(1/2)
)^2+3*(1+x)^(1/2)-2)^(1/2)+ln(1/2+(1+x)^(1/2)+((-1+(1+x)^(1/2))^2+3*(1+x)^(1/2)-2)^(1/2))-2/3*arctanh(1/2*(-1+
3*(1+x)^(1/2))/((-1+(1+x)^(1/2))^2+3*(1+x)^(1/2)-2)^(1/2))-8/3*(((1+x)^(1/2)+2)^2-3*(1+x)^(1/2)-5)^(1/2)+4*ln(
1/2+(1+x)^(1/2)+(((1+x)^(1/2)+2)^2-3*(1+x)^(1/2)-5)^(1/2))+8/3*arctanh(1/2*(-4-3*(1+x)^(1/2))/(((1+x)^(1/2)+2)
^2-3*(1+x)^(1/2)-5)^(1/2))-2*(1+x)^(1/2)-2/3*ln(-1+(1+x)^(1/2))+8/3*ln((1+x)^(1/2)+2)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x + 1}}{\sqrt {x + \sqrt {x + 1}} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x + 1}}{\sqrt {x + \sqrt {x + 1}} + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(x + 1)/(sqrt(x + sqrt(x + 1)) + 1), x)

________________________________________________________________________________________