Optimal. Leaf size=97 \[ \sqrt {x+1} \sqrt {x+\sqrt {x+1}}-\frac {3}{2} \sqrt {x+\sqrt {x+1}}+\frac {1}{4} \log \left (2 \sqrt {x+1}-2 \sqrt {x+\sqrt {x+1}}+1\right )-4 \tan ^{-1}\left (\sqrt {x+1}-\sqrt {x+\sqrt {x+1}}+1\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 91, normalized size of antiderivative = 0.94, number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {814, 843, 621, 206, 724, 204} \begin {gather*} -\frac {1}{2} \sqrt {x+\sqrt {x+1}} \left (3-2 \sqrt {x+1}\right )-2 \tan ^{-1}\left (\frac {\sqrt {x+1}+3}{2 \sqrt {x+\sqrt {x+1}}}\right )-\frac {1}{4} \tanh ^{-1}\left (\frac {2 \sqrt {x+1}+1}{2 \sqrt {x+\sqrt {x+1}}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 206
Rule 621
Rule 724
Rule 814
Rule 843
Rubi steps
\begin {align*} \int \frac {\sqrt {x+\sqrt {1+x}}}{1+\sqrt {1+x}} \, dx &=2 \operatorname {Subst}\left (\int \frac {x \sqrt {-1+x+x^2}}{1+x} \, dx,x,\sqrt {1+x}\right )\\ &=-\frac {1}{2} \left (3-2 \sqrt {1+x}\right ) \sqrt {x+\sqrt {1+x}}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {-\frac {7}{2}+\frac {x}{2}}{(1+x) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )\\ &=-\frac {1}{2} \left (3-2 \sqrt {1+x}\right ) \sqrt {x+\sqrt {1+x}}-\frac {1}{4} \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )+2 \operatorname {Subst}\left (\int \frac {1}{(1+x) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )\\ &=-\frac {1}{2} \left (3-2 \sqrt {1+x}\right ) \sqrt {x+\sqrt {1+x}}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {1+2 \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )-4 \operatorname {Subst}\left (\int \frac {1}{-4-x^2} \, dx,x,\frac {-3-\sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )\\ &=-\frac {1}{2} \left (3-2 \sqrt {1+x}\right ) \sqrt {x+\sqrt {1+x}}-2 \tan ^{-1}\left (\frac {3+\sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )-\frac {1}{4} \tanh ^{-1}\left (\frac {1+2 \sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 93, normalized size = 0.96 \begin {gather*} \frac {1}{4} \left (2 \sqrt {x+\sqrt {x+1}} \left (2 \sqrt {x+1}-3\right )+8 \tan ^{-1}\left (\frac {-\sqrt {x+1}-3}{2 \sqrt {x+\sqrt {x+1}}}\right )-\tanh ^{-1}\left (\frac {2 \sqrt {x+1}+1}{2 \sqrt {x+\sqrt {x+1}}}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.22, size = 87, normalized size = 0.90 \begin {gather*} \frac {1}{2} \sqrt {x+\sqrt {1+x}} \left (-3+2 \sqrt {1+x}\right )-4 \tan ^{-1}\left (1+\sqrt {1+x}-\sqrt {x+\sqrt {1+x}}\right )+\frac {1}{4} \log \left (-1-2 \sqrt {1+x}+2 \sqrt {x+\sqrt {1+x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.93, size = 82, normalized size = 0.85 \begin {gather*} \frac {1}{2} \, \sqrt {x + \sqrt {x + 1}} {\left (2 \, \sqrt {x + 1} - 3\right )} + 2 \, \arctan \left (\frac {2 \, \sqrt {x + \sqrt {x + 1}} {\left (\sqrt {x + 1} - 3\right )}}{x - 8}\right ) + \frac {1}{8} \, \log \left (4 \, \sqrt {x + \sqrt {x + 1}} {\left (2 \, \sqrt {x + 1} + 1\right )} - 8 \, x - 8 \, \sqrt {x + 1} - 5\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 65, normalized size = 0.67 \begin {gather*} \frac {1}{2} \, \sqrt {x + \sqrt {x + 1}} {\left (2 \, \sqrt {x + 1} - 3\right )} + 4 \, \arctan \left (\sqrt {x + \sqrt {x + 1}} - \sqrt {x + 1} - 1\right ) + \frac {1}{4} \, \log \left (-2 \, \sqrt {x + \sqrt {x + 1}} + 2 \, \sqrt {x + 1} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 125, normalized size = 1.29
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}-2 \sqrt {\left (1+\sqrt {1+x}\right )^{2}-\sqrt {1+x}-2}+\ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (1+\sqrt {1+x}\right )^{2}-\sqrt {1+x}-2}\right )+2 \arctan \left (\frac {-3-\sqrt {1+x}}{2 \sqrt {\left (1+\sqrt {1+x}\right )^{2}-\sqrt {1+x}-2}}\right )\) | \(125\) |
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}-2 \sqrt {\left (1+\sqrt {1+x}\right )^{2}-\sqrt {1+x}-2}+\ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (1+\sqrt {1+x}\right )^{2}-\sqrt {1+x}-2}\right )+2 \arctan \left (\frac {-3-\sqrt {1+x}}{2 \sqrt {\left (1+\sqrt {1+x}\right )^{2}-\sqrt {1+x}-2}}\right )\) | \(125\) |
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 + \sqrt {x + 1}}}{\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+\sqrt {x+1}}}{\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 + \sqrt {x + 1}}}{\sqrt {x + 1} + 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________