Integrand size = 24, antiderivative size = 131 \[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {2 (6+3 x) \sqrt {1+x^2}+2 \left (1+6 x+3 x^2\right )}{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 ) \]
[Out]
Time = 0.21 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.02, number of steps used = 13, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {6874, 2142, 14, 2144, 1642, 842, 840, 1180, 213, 209} \[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {4 \arctan \left (\sqrt {1+\sqrt {2}} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {\sqrt {2}-1}}-\frac {4 \text {arctanh}\left (\sqrt {\sqrt {2}-1} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {1+\sqrt {2}}}+\sqrt {\sqrt {x^2+1}+x}+\frac {4}{\sqrt {\sqrt {x^2+1}+x}}-\frac {1}{3 \left (\sqrt {x^2+1}+x\right )^{3/2}} \]
[In]
[Out]
Rule 14
Rule 209
Rule 213
Rule 840
Rule 842
Rule 1180
Rule 1642
Rule 2142
Rule 2144
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{\sqrt {x+\sqrt {1+x^2}}}+\frac {2}{(-1+x) \sqrt {x+\sqrt {1+x^2}}}\right ) \, dx \\ & = 2 \int \frac {1}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx+\int \frac {1}{\sqrt {x+\sqrt {1+x^2}}} \, dx \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1+x^2}{x^{5/2}} \, dx,x,x+\sqrt {1+x^2}\right )+2 \text {Subst}\left (\int \frac {1+x^2}{x^{3/2} \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^{5/2}}+\frac {1}{\sqrt {x}}\right ) \, dx,x,x+\sqrt {1+x^2}\right )+2 \text {Subst}\left (\int \left (\frac {1}{x^{3/2}}+\frac {2 (1+x)}{x^{3/2} \left (-1-2 x+x^2\right )}\right ) \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+4 \text {Subst}\left (\int \frac {1+x}{x^{3/2} \left (-1-2 x+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^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}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^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}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+4 \text {Subst}\left (\int \frac {1}{-1-\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+4 \text {Subst}\left (\int \frac {1}{-1+\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+\frac {4 \arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right )}{\sqrt {-1+\sqrt {2}}}-\frac {4 \text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )}{\sqrt {1+\sqrt {2}}} \\ \end{align*}
Time = 0.18 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.96 \[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {2+12 x+6 x^2+6 (2+x) \sqrt {1+x^2}}{3 \left (x+\sqrt {1+x^2}\right )^{3/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 {1+x}{\left (-1+x \right ) \sqrt {x +\sqrt {x^{2}+1}}}d x\]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 193 vs. \(2 (94) = 188\).
Time = 0.27 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.47 \[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {2}{3} \, {\left (x^{2} - \sqrt {x^{2} + 1} {\left (x + 6\right )} + 6 \, x - 1\right )} \sqrt {x + \sqrt {x^{2} + 1}} - 2 \, \sqrt {\sqrt {2} - 1} \log \left (4 \, {\left (\sqrt {2} + 1\right )} \sqrt {\sqrt {2} - 1} + 4 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) + 2 \, \sqrt {\sqrt {2} - 1} \log \left (-4 \, {\left (\sqrt {2} + 1\right )} \sqrt {\sqrt {2} - 1} + 4 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) + \frac {1}{2} \, \sqrt {-16 \, \sqrt {2} - 16} \log \left ({\left (\sqrt {2} - 1\right )} \sqrt {-16 \, \sqrt {2} - 16} + 4 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) - \frac {1}{2} \, \sqrt {-16 \, \sqrt {2} - 16} \log \left (-{\left (\sqrt {2} - 1\right )} \sqrt {-16 \, \sqrt {2} - 16} + 4 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) \]
[In]
[Out]
\[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {x + 1}{\left (x - 1\right ) \sqrt {x + \sqrt {x^{2} + 1}}}\, dx \]
[In]
[Out]
\[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {x + 1}{\sqrt {x + \sqrt {x^{2} + 1}} {\left (x - 1\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {x + 1}{\sqrt {x + \sqrt {x^{2} + 1}} {\left (x - 1\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {1+x}{(-1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {x+1}{\sqrt {x+\sqrt {x^2+1}}\,\left (x-1\right )} \,d x \]
[In]
[Out]