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]
[Out]
Rule 206
Rule 612
Rule 621
Rule 724
Rule 734
Rule 843
Rule 6742
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________