Integrand size = 23, antiderivative size = 105 \[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\sqrt {2} \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 )+\sqrt {2} \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 ) \]
[Out]
Time = 0.09 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.38, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {2147, 335, 217, 1179, 642, 1176, 631, 210} \[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=-\sqrt {2} \arctan \left (1-\sqrt {2} \sqrt {\sqrt {x^2+1}+x}\right )+\sqrt {2} \arctan \left (\sqrt {2} \sqrt {\sqrt {x^2+1}+x}+1\right )-\frac {\log \left (\sqrt {x^2+1}-\sqrt {2} \sqrt {\sqrt {x^2+1}+x}+x+1\right )}{\sqrt {2}}+\frac {\log \left (\sqrt {x^2+1}+\sqrt {2} \sqrt {\sqrt {x^2+1}+x}+x+1\right )}{\sqrt {2}} \]
[In]
[Out]
Rule 210
Rule 217
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 2147
Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (1+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = 4 \text {Subst}\left (\int \frac {1}{1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = 2 \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+2 \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {\text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )}{\sqrt {2}}-\frac {\text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )}{\sqrt {2}}+\text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )+\text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\frac {\log \left (1+x+\sqrt {1+x^2}-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{\sqrt {2}}+\frac {\log \left (1+x+\sqrt {1+x^2}+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{\sqrt {2}}+\sqrt {2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )-\sqrt {2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\sqrt {2} \arctan \left (1-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )+\sqrt {2} \arctan \left (1+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )-\frac {\log \left (1+x+\sqrt {1+x^2}-\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{\sqrt {2}}+\frac {\log \left (1+x+\sqrt {1+x^2}+\sqrt {2} \sqrt {x+\sqrt {1+x^2}}\right )}{\sqrt {2}} \\ \end{align*}
Time = 0.12 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.71 \[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\sqrt {2} \left (\arctan \left (\frac {-1+x+\sqrt {1+x^2}}{\sqrt {2} \sqrt {x+\sqrt {1+x^2}}}\right )+\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 ) \sqrt {x +\sqrt {x^{2}+1}}}d x\]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.27 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.96 \[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \sqrt {2} \log \left (\left (i + 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) - \left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \log \left (-\left (i - 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) + \left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \log \left (\left (i - 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) - \left (\frac {1}{2} i + \frac {1}{2}\right ) \, \sqrt {2} \log \left (-\left (i + 1\right ) \, \sqrt {2} + 2 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) \]
[In]
[Out]
\[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {1}{\sqrt {x + \sqrt {x^{2} + 1}} \left (x^{2} + 1\right )}\, dx \]
[In]
[Out]
\[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {1}{{\left (x^{2} + 1\right )} \sqrt {x + \sqrt {x^{2} + 1}}} \,d x } \]
[In]
[Out]
\[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int { \frac {1}{{\left (x^{2} + 1\right )} \sqrt {x + \sqrt {x^{2} + 1}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {1}{\left (1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\int \frac {1}{\left (x^2+1\right )\,\sqrt {x+\sqrt {x^2+1}}} \,d x \]
[In]
[Out]