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

Optimal result
Mathematica [A] (verified)
Rubi [A] (warning: unable to verify)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 34, antiderivative size = 118 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\frac {16}{3} \sqrt {1+\sqrt {1+x}}+\frac {4}{3} \sqrt {1+x} \sqrt {1+\sqrt {1+x}}-\frac {4}{5} \left (-5+2 \sqrt {5}\right ) \text {arctanh}\left (\frac {2 \sqrt {1+\sqrt {1+x}}}{-1+\sqrt {5}}\right )-\frac {4}{5} \left (5+2 \sqrt {5}\right ) \text {arctanh}\left (\frac {2 \sqrt {1+\sqrt {1+x}}}{1+\sqrt {5}}\right ) \] Output:

16/3*(1+(1+x)^(1/2))^(1/2)+4/3*(1+x)^(1/2)*(1+(1+x)^(1/2))^(1/2)-4/5*(-5+2 
*5^(1/2))*arctanh(2*(1+(1+x)^(1/2))^(1/2)/(5^(1/2)-1))-4/5*(5+2*5^(1/2))*a 
rctanh(2*(1+(1+x)^(1/2))^(1/2)/(5^(1/2)+1))
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.85 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\frac {4}{15} \left (5 \sqrt {1+\sqrt {1+x}} \left (4+\sqrt {1+x}\right )-3 \left (5+2 \sqrt {5}\right ) \text {arctanh}\left (\frac {1}{2} \left (-1+\sqrt {5}\right ) \sqrt {1+\sqrt {1+x}}\right )+\left (15-6 \sqrt {5}\right ) \text {arctanh}\left (\frac {1}{2} \left (1+\sqrt {5}\right ) \sqrt {1+\sqrt {1+x}}\right )\right ) \] Input:

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

Output:

(4*(5*Sqrt[1 + Sqrt[1 + x]]*(4 + Sqrt[1 + x]) - 3*(5 + 2*Sqrt[5])*ArcTanh[ 
((-1 + Sqrt[5])*Sqrt[1 + Sqrt[1 + x]])/2] + (15 - 6*Sqrt[5])*ArcTanh[((1 + 
 Sqrt[5])*Sqrt[1 + Sqrt[1 + x]])/2]))/15
 

Rubi [A] (warning: unable to verify)

Time = 0.57 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.07, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {7267, 25, 1199, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 7267

\(\displaystyle 2 \int -\frac {(x+1) \sqrt {\sqrt {x+1}+1}}{\sqrt {x+1}-x}d\sqrt {x+1}\)

\(\Big \downarrow \) 25

\(\displaystyle -2 \int \frac {(x+1) \sqrt {\sqrt {x+1}+1}}{\sqrt {x+1}-x}d\sqrt {x+1}\)

\(\Big \downarrow \) 1199

\(\displaystyle -4 \int \left (-x+\frac {1-3 (x+1)}{(x+1)^2-3 (x+1)+1}-2\right )d\sqrt {\sqrt {x+1}+1}\)

\(\Big \downarrow \) 2009

\(\displaystyle -4 \left (\sqrt {\frac {1}{5} \left (9+4 \sqrt {5}\right )} \text {arctanh}\left (\sqrt {\frac {2}{3+\sqrt {5}}} \sqrt {\sqrt {x+1}+1}\right )-\sqrt {\frac {1}{5} \left (9-4 \sqrt {5}\right )} \text {arctanh}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} \sqrt {\sqrt {x+1}+1}\right )-\frac {1}{3} (x+1)^{3/2}-\sqrt {\sqrt {x+1}+1}\right )\)

Input:

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

Output:

-4*(-1/3*(1 + x)^(3/2) - Sqrt[1 + Sqrt[1 + x]] + Sqrt[(9 + 4*Sqrt[5])/5]*A 
rcTanh[Sqrt[2/(3 + Sqrt[5])]*Sqrt[1 + Sqrt[1 + x]]] - Sqrt[(9 - 4*Sqrt[5]) 
/5]*ArcTanh[Sqrt[(3 + Sqrt[5])/2]*Sqrt[1 + Sqrt[1 + x]]])
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 1199
Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_))/((a_.) + (b_.)*(x 
_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Denominator[m]}, Simp[q/e   Subs 
t[Int[ExpandIntegrand[x^(q*(m + 1) - 1)*(((e*f - d*g)/e + g*(x^q/e))^n/((c* 
d^2 - b*d*e + a*e^2)/e^2 - (2*c*d - b*e)*(x^q/e^2) + c*(x^(2*q)/e^2))), x], 
 x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, b, c, d, e, f, g}, x] && Integer 
Q[n] && FractionQ[m]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7267
Int[u_, x_Symbol] :> With[{lst = SubstForFractionalPowerOfLinear[u, x]}, Si 
mp[lst[[2]]*lst[[4]]   Subst[Int[lst[[1]], x], x, lst[[3]]^(1/lst[[2]])], x 
] /;  !FalseQ[lst] && SubstForFractionalPowerQ[u, lst[[3]], x]]
 
Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.93

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

Input:

int((1+x)^(1/2)*(1+(1+x)^(1/2))^(1/2)/(x-(1+x)^(1/2)),x,method=_RETURNVERB 
OSE)
 

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 243 vs. \(2 (84) = 168\).

Time = 0.08 (sec) , antiderivative size = 243, normalized size of antiderivative = 2.06 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\frac {4}{3} \, {\left (\sqrt {x + 1} + 4\right )} \sqrt {\sqrt {x + 1} + 1} + \frac {4}{5} \, \sqrt {5} \log \left (\frac {2 \, x^{2} + \sqrt {5} {\left (3 \, x + 1\right )} + {\left (\sqrt {5} {\left (x + 2\right )} + 5 \, x\right )} \sqrt {x + 1} - {\left (\sqrt {5} {\left (x + 2\right )} + {\left (\sqrt {5} {\left (2 \, x - 1\right )} + 5\right )} \sqrt {x + 1} + 5 \, x\right )} \sqrt {\sqrt {x + 1} + 1} + 3 \, x + 3}{x^{2} - x - 1}\right ) + \frac {4}{5} \, \sqrt {5} \log \left (\frac {2 \, x^{2} - \sqrt {5} {\left (3 \, x + 1\right )} - {\left (\sqrt {5} {\left (x + 2\right )} - 5 \, x\right )} \sqrt {x + 1} - {\left (\sqrt {5} {\left (x + 2\right )} + {\left (\sqrt {5} {\left (2 \, x - 1\right )} - 5\right )} \sqrt {x + 1} - 5 \, x\right )} \sqrt {\sqrt {x + 1} + 1} + 3 \, x + 3}{x^{2} - x - 1}\right ) - 2 \, \log \left (\sqrt {x + 1} + \sqrt {\sqrt {x + 1} + 1}\right ) + 2 \, \log \left (\sqrt {x + 1} - \sqrt {\sqrt {x + 1} + 1}\right ) \] Input:

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

Output:

4/3*(sqrt(x + 1) + 4)*sqrt(sqrt(x + 1) + 1) + 4/5*sqrt(5)*log((2*x^2 + sqr 
t(5)*(3*x + 1) + (sqrt(5)*(x + 2) + 5*x)*sqrt(x + 1) - (sqrt(5)*(x + 2) + 
(sqrt(5)*(2*x - 1) + 5)*sqrt(x + 1) + 5*x)*sqrt(sqrt(x + 1) + 1) + 3*x + 3 
)/(x^2 - x - 1)) + 4/5*sqrt(5)*log((2*x^2 - sqrt(5)*(3*x + 1) - (sqrt(5)*( 
x + 2) - 5*x)*sqrt(x + 1) - (sqrt(5)*(x + 2) + (sqrt(5)*(2*x - 1) - 5)*sqr 
t(x + 1) - 5*x)*sqrt(sqrt(x + 1) + 1) + 3*x + 3)/(x^2 - x - 1)) - 2*log(sq 
rt(x + 1) + sqrt(sqrt(x + 1) + 1)) + 2*log(sqrt(x + 1) - sqrt(sqrt(x + 1) 
+ 1))
 

Sympy [A] (verification not implemented)

Time = 4.46 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.56 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\frac {4 \left (\sqrt {x + 1} + 1\right )^{\frac {3}{2}}}{3} + 4 \sqrt {\sqrt {x + 1} + 1} + \frac {4 \sqrt {5} \left (- \log {\left (\sqrt {\sqrt {x + 1} + 1} - \frac {1}{2} + \frac {\sqrt {5}}{2} \right )} + \log {\left (\sqrt {\sqrt {x + 1} + 1} - \frac {\sqrt {5}}{2} - \frac {1}{2} \right )}\right )}{5} + \frac {4 \sqrt {5} \left (- \log {\left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2} + \frac {\sqrt {5}}{2} \right )} + \log {\left (\sqrt {\sqrt {x + 1} + 1} - \frac {\sqrt {5}}{2} + \frac {1}{2} \right )}\right )}{5} + 2 \log {\left (\sqrt {x + 1} - \sqrt {\sqrt {x + 1} + 1} \right )} - 2 \log {\left (\sqrt {x + 1} + \sqrt {\sqrt {x + 1} + 1} \right )} \] Input:

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

Output:

4*(sqrt(x + 1) + 1)**(3/2)/3 + 4*sqrt(sqrt(x + 1) + 1) + 4*sqrt(5)*(-log(s 
qrt(sqrt(x + 1) + 1) - 1/2 + sqrt(5)/2) + log(sqrt(sqrt(x + 1) + 1) - sqrt 
(5)/2 - 1/2))/5 + 4*sqrt(5)*(-log(sqrt(sqrt(x + 1) + 1) + 1/2 + sqrt(5)/2) 
 + log(sqrt(sqrt(x + 1) + 1) - sqrt(5)/2 + 1/2))/5 + 2*log(sqrt(x + 1) - s 
qrt(sqrt(x + 1) + 1)) - 2*log(sqrt(x + 1) + sqrt(sqrt(x + 1) + 1))
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.23 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} + \frac {4}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - 2 \, \sqrt {\sqrt {x + 1} + 1} + 1}{\sqrt {5} + 2 \, \sqrt {\sqrt {x + 1} + 1} - 1}\right ) + \frac {4}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - 2 \, \sqrt {\sqrt {x + 1} + 1} - 1}{\sqrt {5} + 2 \, \sqrt {\sqrt {x + 1} + 1} + 1}\right ) + 4 \, \sqrt {\sqrt {x + 1} + 1} - 2 \, \log \left (\sqrt {x + 1} + \sqrt {\sqrt {x + 1} + 1}\right ) + 2 \, \log \left (\sqrt {x + 1} - \sqrt {\sqrt {x + 1} + 1}\right ) \] Input:

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

Output:

4/3*(sqrt(x + 1) + 1)^(3/2) + 4/5*sqrt(5)*log(-(sqrt(5) - 2*sqrt(sqrt(x + 
1) + 1) + 1)/(sqrt(5) + 2*sqrt(sqrt(x + 1) + 1) - 1)) + 4/5*sqrt(5)*log(-( 
sqrt(5) - 2*sqrt(sqrt(x + 1) + 1) - 1)/(sqrt(5) + 2*sqrt(sqrt(x + 1) + 1) 
+ 1)) + 4*sqrt(sqrt(x + 1) + 1) - 2*log(sqrt(x + 1) + sqrt(sqrt(x + 1) + 1 
)) + 2*log(sqrt(x + 1) - sqrt(sqrt(x + 1) + 1))
 

Giac [A] (verification not implemented)

Time = 0.61 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.26 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\frac {4}{3} \, {\left (\sqrt {x + 1} + 1\right )}^{\frac {3}{2}} + \frac {4}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - 2 \, \sqrt {\sqrt {x + 1} + 1} - 1}{\sqrt {5} + 2 \, \sqrt {\sqrt {x + 1} + 1} + 1}\right ) + \frac {4}{5} \, \sqrt {5} \log \left (\frac {{\left | -\sqrt {5} + 2 \, \sqrt {\sqrt {x + 1} + 1} - 1 \right |}}{{\left | \sqrt {5} + 2 \, \sqrt {\sqrt {x + 1} + 1} - 1 \right |}}\right ) + 4 \, \sqrt {\sqrt {x + 1} + 1} - 2 \, \log \left (\sqrt {x + 1} + \sqrt {\sqrt {x + 1} + 1}\right ) + 2 \, \log \left ({\left | \sqrt {x + 1} - \sqrt {\sqrt {x + 1} + 1} \right |}\right ) \] Input:

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

Output:

4/3*(sqrt(x + 1) + 1)^(3/2) + 4/5*sqrt(5)*log(-(sqrt(5) - 2*sqrt(sqrt(x + 
1) + 1) - 1)/(sqrt(5) + 2*sqrt(sqrt(x + 1) + 1) + 1)) + 4/5*sqrt(5)*log(ab 
s(-sqrt(5) + 2*sqrt(sqrt(x + 1) + 1) - 1)/abs(sqrt(5) + 2*sqrt(sqrt(x + 1) 
 + 1) - 1)) + 4*sqrt(sqrt(x + 1) + 1) - 2*log(sqrt(x + 1) + sqrt(sqrt(x + 
1) + 1)) + 2*log(abs(sqrt(x + 1) - sqrt(sqrt(x + 1) + 1)))
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.42 \[ \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\frac {4 \sqrt {x +1}\, \sqrt {\sqrt {x +1}+1}}{3}+\frac {16 \sqrt {\sqrt {x +1}+1}}{3}+\frac {4 \sqrt {5}\, \mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}-\sqrt {5}-1\right )}{5}+\frac {4 \sqrt {5}\, \mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}-\sqrt {5}+1\right )}{5}-\frac {4 \sqrt {5}\, \mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}+\sqrt {5}-1\right )}{5}-\frac {4 \sqrt {5}\, \mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}+\sqrt {5}+1\right )}{5}+2 \,\mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}-\sqrt {5}-1\right )-2 \,\mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}-\sqrt {5}+1\right )+2 \,\mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}+\sqrt {5}-1\right )-2 \,\mathrm {log}\left (2 \sqrt {\sqrt {x +1}+1}+\sqrt {5}+1\right ) \] Input:

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

Output:

(2*(10*sqrt(x + 1)*sqrt(sqrt(x + 1) + 1) + 40*sqrt(sqrt(x + 1) + 1) + 6*sq 
rt(5)*log(2*sqrt(sqrt(x + 1) + 1) - sqrt(5) - 1) + 6*sqrt(5)*log(2*sqrt(sq 
rt(x + 1) + 1) - sqrt(5) + 1) - 6*sqrt(5)*log(2*sqrt(sqrt(x + 1) + 1) + sq 
rt(5) - 1) - 6*sqrt(5)*log(2*sqrt(sqrt(x + 1) + 1) + sqrt(5) + 1) + 15*log 
(2*sqrt(sqrt(x + 1) + 1) - sqrt(5) - 1) - 15*log(2*sqrt(sqrt(x + 1) + 1) - 
 sqrt(5) + 1) + 15*log(2*sqrt(sqrt(x + 1) + 1) + sqrt(5) - 1) - 15*log(2*s 
qrt(sqrt(x + 1) + 1) + sqrt(5) + 1)))/15