Integrand size = 23, antiderivative size = 185 \[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {3 \sqrt {x+\sqrt {1+x^2}}}{8 \left (1+x^2+x \sqrt {1+x^2}\right )^2}+\frac {\left (x+\sqrt {1+x^2}\right )^{5/2}}{8 \left (1+x^2+x \sqrt {1+x^2}\right )^2}+\frac {3 \arctan \left (\frac {-\frac {1}{\sqrt {2}}+\frac {x}{\sqrt {2}}+\frac {\sqrt {1+x^2}}{\sqrt {2}}}{\sqrt {x+\sqrt {1+x^2}}}\right )}{4 \sqrt {2}}+\frac {3 \text {arctanh}\left (\frac {\frac {1}{\sqrt {2}}+\frac {x}{\sqrt {2}}+\frac {\sqrt {1+x^2}}{\sqrt {2}}}{\sqrt {x+\sqrt {1+x^2}}}\right )}{4 \sqrt {2}} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 225, normalized size of antiderivative = 1.22, number of steps used = 13, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {2147, 294, 296, 335, 217, 1179, 642, 1176, 631, 210} \[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {3 \arctan \left (1-\sqrt {2} \sqrt {\sqrt {x^2+1}+x}\right )}{4 \sqrt {2}}+\frac {3 \arctan \left (\sqrt {2} \sqrt {\sqrt {x^2+1}+x}+1\right )}{4 \sqrt {2}}+\frac {\sqrt {\sqrt {x^2+1}+x}}{2 \left (\left (\sqrt {x^2+1}+x\right )^2+1\right )}-\frac {2 \sqrt {\sqrt {x^2+1}+x}}{\left (\left (\sqrt {x^2+1}+x\right )^2+1\right )^2}-\frac {3 \log \left (\sqrt {x^2+1}-\sqrt {2} \sqrt {\sqrt {x^2+1}+x}+x+1\right )}{8 \sqrt {2}}+\frac {3 \log \left (\sqrt {x^2+1}+\sqrt {2} \sqrt {\sqrt {x^2+1}+x}+x+1\right )}{8 \sqrt {2}} \]
[In]
[Out]
Rule 210
Rule 217
Rule 294
Rule 296
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 2147
Rubi steps \begin{align*} \text {integral}& = 8 \text {Subst}\left (\int \frac {x^{3/2}}{\left (1+x^2\right )^3} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {2 \sqrt {x+\sqrt {1+x^2}}}{\left (1+\left (x+\sqrt {1+x^2}\right )^2\right )^2}+\text {Subst}\left (\int \frac {1}{\sqrt {x} \left (1+x^2\right )^2} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {2 \sqrt {x+\sqrt {1+x^2}}}{\left (1+\left (x+\sqrt {1+x^2}\right )^2\right )^2}+\frac {\sqrt {x+\sqrt {1+x^2}}}{2 \left (1+\left (x+\sqrt {1+x^2}\right )^2\right )}+\frac {3}{4} \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (1+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\frac {2 \sqrt {x+\sqrt {1+x^2}}}{\left (1+\left (x+\sqrt {1+x^2}\right )^2\right )^2}+\frac {\sqrt {x+\sqrt {1+x^2}}}{2 \left (1+\left (x+\sqrt {1+x^2}\right )^2\right )}+\frac {3}{2} \text {Subst}\left (\int \frac {1}{1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {2 \sqrt {x+\sqrt {1+x^2}}}{\left (1+\left (x+\sqrt {1+x^2}\right )^2\right )^2}+\frac {\sqrt {x+\sqrt {1+x^2}}}{2 \left (1+\left (x+\sqrt {1+x^2}\right )^2\right )}+\frac {3}{4} \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+\frac {3}{4} \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {2 \sqrt {x+\sqrt {1+x^2}}}{\left (1+\left (x+\sqrt {1+x^2}\right )^2\right )^2}+\frac {\sqrt {x+\sqrt {1+x^2}}}{2 \left (1+\left (x+\sqrt {1+x^2}\right )^2\right )}+\frac {3}{8} \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+\frac {3}{8} \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\frac {3 \text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )}{8 \sqrt {2}}-\frac {3 \text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )}{8 \sqrt {2}} \\ & = -\frac {2 \sqrt {x+\sqrt {1+x^2}}}{\left (1+\left (x+\sqrt {1+x^2}\right )^2\right )^2}+\frac {\sqrt {x+\sqrt {1+x^2}}}{2 \left (1+\left (x+\sqrt {1+x^2}\right )^2\right )}-\frac {3 \log \left (1+x+\sqrt {1+x^2}-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{8 \sqrt {2}}+\frac {3 \log \left (1+x+\sqrt {1+x^2}+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{8 \sqrt {2}}+\frac {3 \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{4 \sqrt {2}}-\frac {3 \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{4 \sqrt {2}} \\ & = -\frac {2 \sqrt {x+\sqrt {1+x^2}}}{\left (1+\left (x+\sqrt {1+x^2}\right )^2\right )^2}+\frac {\sqrt {x+\sqrt {1+x^2}}}{2 \left (1+\left (x+\sqrt {1+x^2}\right )^2\right )}-\frac {3 \arctan \left (1-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{4 \sqrt {2}}+\frac {3 \arctan \left (1+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{4 \sqrt {2}}-\frac {3 \log \left (1+x+\sqrt {1+x^2}-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{8 \sqrt {2}}+\frac {3 \log \left (1+x+\sqrt {1+x^2}+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{8 \sqrt {2}} \\ \end{align*}
Time = 0.33 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.75 \[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=\frac {1}{8} \left (\frac {2 \sqrt {x+\sqrt {1+x^2}} \left (-1+x^2+x \sqrt {1+x^2}\right )}{\left (1+x^2+x \sqrt {1+x^2}\right )^2}+3 \sqrt {2} \arctan \left (\frac {-1+x+\sqrt {1+x^2}}{\sqrt {2} \sqrt {x+\sqrt {1+x^2}}}\right )+3 \sqrt {2} \text {arctanh}\left (\frac {1+x+\sqrt {1+x^2}}{\sqrt {2} \sqrt {x+\sqrt {1+x^2}}}\right )\right ) \]
[In]
[Out]
\[\int \frac {1}{\left (x^{2}+1\right )^{2} \sqrt {x +\sqrt {x^{2}+1}}}d x\]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.28 (sec) , antiderivative size = 168, normalized size of antiderivative = 0.91 \[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {3 \, \sqrt {2} {\left (-\left (i + 1\right ) \, x^{2} - i - 1\right )} \log \left (\left (i + 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) + 3 \, \sqrt {2} {\left (\left (i - 1\right ) \, x^{2} + i - 1\right )} \log \left (-\left (i - 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) + 3 \, \sqrt {2} {\left (-\left (i - 1\right ) \, x^{2} - i + 1\right )} \log \left (\left (i - 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) + 3 \, \sqrt {2} {\left (\left (i + 1\right ) \, x^{2} + i + 1\right )} \log \left (-\left (i + 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) + 4 \, {\left (3 \, x^{2} - 3 \, \sqrt {x^{2} + 1} x + 1\right )} \sqrt {x + \sqrt {x^{2} + 1}}}{16 \, {\left (x^{2} + 1\right )}} \]
[In]
[Out]
\[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {1}{\sqrt {x + \sqrt {x^{2} + 1}} \left (x^{2} + 1\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {1}{{\left (x^{2} + 1\right )}^{2} \sqrt {x + \sqrt {x^{2} + 1}}} \,d x } \]
[In]
[Out]
\[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {1}{{\left (x^{2} + 1\right )}^{2} \sqrt {x + \sqrt {x^{2} + 1}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {1}{\left (1+x^2\right )^2 \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {1}{{\left (x^2+1\right )}^2\,\sqrt {x+\sqrt {x^2+1}}} \,d x \]
[In]
[Out]