Optimal. Leaf size=118 \[ \frac {4}{3} \sqrt {x+1} \sqrt {\sqrt {x+1}+1}+\frac {16}{3} \sqrt {\sqrt {x+1}+1}-\frac {4}{5} \left (2 \sqrt {5}-5\right ) \tanh ^{-1}\left (\frac {2 \sqrt {\sqrt {x+1}+1}}{\sqrt {5}-1}\right )-\frac {4}{5} \left (5+2 \sqrt {5}\right ) \tanh ^{-1}\left (\frac {2 \sqrt {\sqrt {x+1}+1}}{1+\sqrt {5}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.49, antiderivative size = 131, normalized size of antiderivative = 1.11, number of steps used = 7, number of rules used = 4, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {897, 1287, 1166, 207} \begin {gather*} \frac {4}{3} \left (\sqrt {x+1}+1\right )^{3/2}+4 \sqrt {\sqrt {x+1}+1}-4 \sqrt {\frac {1}{5} \left (9+4 \sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} \sqrt {\sqrt {x+1}+1}\right )+4 \sqrt {\frac {1}{5} \left (9-4 \sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} \sqrt {\sqrt {x+1}+1}\right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 207
Rule 897
Rule 1166
Rule 1287
Rubi steps
\begin {align*} \int \frac {\sqrt {1+x} \sqrt {1+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx &=2 \operatorname {Subst}\left (\int \frac {x^2 \sqrt {1+x}}{-1-x+x^2} \, dx,x,\sqrt {1+x}\right )\\ &=4 \operatorname {Subst}\left (\int \frac {x^2 \left (-1+x^2\right )^2}{1-3 x^2+x^4} \, dx,x,\sqrt {1+\sqrt {1+x}}\right )\\ &=4 \operatorname {Subst}\left (\int \left (1+x^2-\frac {1-3 x^2}{1-3 x^2+x^4}\right ) \, dx,x,\sqrt {1+\sqrt {1+x}}\right )\\ &=4 \sqrt {1+\sqrt {1+x}}+\frac {4}{3} \left (1+\sqrt {1+x}\right )^{3/2}-4 \operatorname {Subst}\left (\int \frac {1-3 x^2}{1-3 x^2+x^4} \, dx,x,\sqrt {1+\sqrt {1+x}}\right )\\ &=4 \sqrt {1+\sqrt {1+x}}+\frac {4}{3} \left (1+\sqrt {1+x}\right )^{3/2}+\frac {1}{5} \left (2 \left (15-7 \sqrt {5}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {3}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+\sqrt {1+x}}\right )+\frac {1}{5} \left (2 \left (15+7 \sqrt {5}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {3}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx,x,\sqrt {1+\sqrt {1+x}}\right )\\ &=4 \sqrt {1+\sqrt {1+x}}+\frac {4}{3} \left (1+\sqrt {1+x}\right )^{3/2}-4 \sqrt {\frac {1}{5} \left (9+4 \sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} \sqrt {1+\sqrt {1+x}}\right )+4 \sqrt {\frac {1}{5} \left (9-4 \sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} \sqrt {1+\sqrt {1+x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.26, size = 143, normalized size = 1.21 \begin {gather*} \frac {4}{3} \sqrt {\sqrt {x+1}+1} \left (\sqrt {x+1}+4\right )-\sqrt {\frac {2}{5} \left (3+\sqrt {5}\right )} \left (3 \sqrt {5}-7\right ) \tanh ^{-1}\left (\sqrt {\frac {2}{3-\sqrt {5}}} \sqrt {\sqrt {x+1}+1}\right )-2 \sqrt {\frac {2}{5 \left (3+\sqrt {5}\right )}} \left (7+3 \sqrt {5}\right ) \tanh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} \sqrt {\sqrt {x+1}+1}\right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.18, size = 103, normalized size = 0.87 \begin {gather*} \frac {4}{3} \sqrt {1+\sqrt {1+x}} \left (4+\sqrt {1+x}\right )-\frac {4}{5} \left (5+2 \sqrt {5}\right ) \tanh ^{-1}\left (\frac {1}{2} \left (-1+\sqrt {5}\right ) \sqrt {1+\sqrt {1+x}}\right )-\frac {4}{5} \left (-5+2 \sqrt {5}\right ) \tanh ^{-1}\left (\frac {1}{2} \left (1+\sqrt {5}\right ) \sqrt {1+\sqrt {1+x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 243, normalized size = 2.06 \begin {gather*} \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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.71, size = 149, normalized size = 1.26 \begin {gather*} \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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 110, normalized size = 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}\, \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}\, \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}\, \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}\, \arctanh \left (\frac {\left (2 \sqrt {1+\sqrt {1+x}}+1\right ) \sqrt {5}}{5}\right )}{5}\) | \(110\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 145, normalized size = 1.23 \begin {gather*} \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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {\sqrt {x+1}+1}\,\sqrt {x+1}}{x-\sqrt {x+1}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 18.31, size = 279, normalized size = 2.36 \begin {gather*} \frac {4 \left (\sqrt {x + 1} + 1\right )^{\frac {3}{2}}}{3} + 4 \sqrt {\sqrt {x + 1} + 1} + 16 \left (\begin {cases} - \frac {\sqrt {5} \operatorname {acoth}{\left (\frac {2 \sqrt {5} \left (\sqrt {\sqrt {x + 1} + 1} - \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {\sqrt {x + 1} + 1} - \frac {1}{2}\right )^{2} > \frac {5}{4} \\- \frac {\sqrt {5} \operatorname {atanh}{\left (\frac {2 \sqrt {5} \left (\sqrt {\sqrt {x + 1} + 1} - \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {\sqrt {x + 1} + 1} - \frac {1}{2}\right )^{2} < \frac {5}{4} \end {cases}\right ) + 16 \left (\begin {cases} - \frac {\sqrt {5} \operatorname {acoth}{\left (\frac {2 \sqrt {5} \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )^{2} > \frac {5}{4} \\- \frac {\sqrt {5} \operatorname {atanh}{\left (\frac {2 \sqrt {5} \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )^{2} < \frac {5}{4} \end {cases}\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 )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________