Integrand size = 24, antiderivative size = 127 \[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=\frac {2 (-6+x) \sqrt {1+x^2}+2 \left (-1-6 x+x^2\right )}{3 \sqrt {x+\sqrt {1+x^2}}}+4 \sqrt {1+\sqrt {2}} \arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )+4 \sqrt {-1+\sqrt {2}} \text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right ) \]
[Out]
Time = 0.21 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.07, number of steps used = 12, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {6874, 2142, 14, 2144, 1642, 840, 1180, 213, 209} \[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=4 \sqrt {1+\sqrt {2}} \arctan \left (\sqrt {\sqrt {2}-1} \sqrt {\sqrt {x^2+1}+x}\right )+4 \sqrt {\sqrt {2}-1} \text {arctanh}\left (\sqrt {1+\sqrt {2}} \sqrt {\sqrt {x^2+1}+x}\right )+\frac {1}{3} \left (\sqrt {x^2+1}+x\right )^{3/2}-4 \sqrt {\sqrt {x^2+1}+x}-\frac {1}{\sqrt {\sqrt {x^2+1}+x}} \]
[In]
[Out]
Rule 14
Rule 209
Rule 213
Rule 840
Rule 1180
Rule 1642
Rule 2142
Rule 2144
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \int \left (\sqrt {x+\sqrt {1+x^2}}-\frac {2 \sqrt {x+\sqrt {1+x^2}}}{1+x}\right ) \, dx \\ & = -\left (2 \int \frac {\sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx\right )+\int \sqrt {x+\sqrt {1+x^2}} \, dx \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1+x^2}{x^{3/2}} \, dx,x,x+\sqrt {1+x^2}\right )-2 \text {Subst}\left (\int \frac {1+x^2}{\sqrt {x} \left (-1+2 x+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (\frac {1}{x^{3/2}}+\sqrt {x}\right ) \, dx,x,x+\sqrt {1+x^2}\right )-2 \text {Subst}\left (\int \left (\frac {1}{\sqrt {x}}+\frac {2 (1-x)}{\sqrt {x} \left (-1+2 x+x^2\right )}\right ) \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{\sqrt {x+\sqrt {1+x^2}}}-4 \sqrt {x+\sqrt {1+x^2}}+\frac {1}{3} \left (x+\sqrt {1+x^2}\right )^{3/2}-4 \text {Subst}\left (\int \frac {1-x}{\sqrt {x} \left (-1+2 x+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{\sqrt {x+\sqrt {1+x^2}}}-4 \sqrt {x+\sqrt {1+x^2}}+\frac {1}{3} \left (x+\sqrt {1+x^2}\right )^{3/2}-8 \text {Subst}\left (\int \frac {1-x^2}{-1+2 x^2+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {1}{\sqrt {x+\sqrt {1+x^2}}}-4 \sqrt {x+\sqrt {1+x^2}}+\frac {1}{3} \left (x+\sqrt {1+x^2}\right )^{3/2}+\left (4 \left (1-\sqrt {2}\right )\right ) \text {Subst}\left (\int \frac {1}{1-\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+\left (4 \left (1+\sqrt {2}\right )\right ) \text {Subst}\left (\int \frac {1}{1+\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {1}{\sqrt {x+\sqrt {1+x^2}}}-4 \sqrt {x+\sqrt {1+x^2}}+\frac {1}{3} \left (x+\sqrt {1+x^2}\right )^{3/2}+4 \sqrt {1+\sqrt {2}} \arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )+4 \sqrt {-1+\sqrt {2}} \text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right ) \\ \end{align*}
Time = 0.25 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.97 \[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=\frac {2 \left (-1-6 x+x^2+(-6+x) \sqrt {1+x^2}\right )}{3 \sqrt {x+\sqrt {1+x^2}}}+4 \sqrt {1+\sqrt {2}} \arctan \left (\sqrt {-1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right )+4 \sqrt {-1+\sqrt {2}} \text {arctanh}\left (\sqrt {1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right ) \]
[In]
[Out]
\[\int \frac {\left (-1+x \right ) \sqrt {x +\sqrt {x^{2}+1}}}{1+x}d x\]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.31 \[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=\frac {2}{3} \, {\left (2 \, x - \sqrt {x^{2} + 1} - 6\right )} \sqrt {x + \sqrt {x^{2} + 1}} + 2 \, \sqrt {\sqrt {2} - 1} \log \left (4 \, \sqrt {x + \sqrt {x^{2} + 1}} + 4 \, \sqrt {\sqrt {2} - 1}\right ) - 2 \, \sqrt {\sqrt {2} - 1} \log \left (4 \, \sqrt {x + \sqrt {x^{2} + 1}} - 4 \, \sqrt {\sqrt {2} - 1}\right ) + \frac {1}{2} \, \sqrt {-16 \, \sqrt {2} - 16} \log \left (4 \, \sqrt {x + \sqrt {x^{2} + 1}} + \sqrt {-16 \, \sqrt {2} - 16}\right ) - \frac {1}{2} \, \sqrt {-16 \, \sqrt {2} - 16} \log \left (4 \, \sqrt {x + \sqrt {x^{2} + 1}} - \sqrt {-16 \, \sqrt {2} - 16}\right ) \]
[In]
[Out]
\[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=\int \frac {\left (x - 1\right ) \sqrt {x + \sqrt {x^{2} + 1}}}{x + 1}\, dx \]
[In]
[Out]
\[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=\int { \frac {\sqrt {x + \sqrt {x^{2} + 1}} {\left (x - 1\right )}}{x + 1} \,d x } \]
[In]
[Out]
\[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=\int { \frac {\sqrt {x + \sqrt {x^{2} + 1}} {\left (x - 1\right )}}{x + 1} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(-1+x) \sqrt {x+\sqrt {1+x^2}}}{1+x} \, dx=\int \frac {\sqrt {x+\sqrt {x^2+1}}\,\left (x-1\right )}{x+1} \,d x \]
[In]
[Out]