Integrand size = 23, antiderivative size = 163 \[ \int \frac {1}{\left (-1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=\sqrt {1+\sqrt {2}} \arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right )-\sqrt {-1+\sqrt {2}} \arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )+\sqrt {1+\sqrt {2}} \text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right )-\sqrt {-1+\sqrt {2}} \text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right ) \]
[Out]
Time = 0.23 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {6857, 2144, 1642, 842, 840, 1180, 210, 212, 213, 209} \[ \int \frac {1}{\left (-1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {\arctan \left (\sqrt {\sqrt {2}-1} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {1+\sqrt {2}}}+\frac {\arctan \left (\sqrt {1+\sqrt {2}} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {\sqrt {2}-1}}-\frac {\text {arctanh}\left (\sqrt {\sqrt {2}-1} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {1+\sqrt {2}}}+\frac {\text {arctanh}\left (\sqrt {1+\sqrt {2}} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {\sqrt {2}-1}} \]
[In]
[Out]
Rule 209
Rule 210
Rule 212
Rule 213
Rule 840
Rule 842
Rule 1180
Rule 1642
Rule 2144
Rule 6857
Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {1}{2 (1-x) \sqrt {x+\sqrt {1+x^2}}}-\frac {1}{2 (1+x) \sqrt {x+\sqrt {1+x^2}}}\right ) \, dx \\ & = -\left (\frac {1}{2} \int \frac {1}{(1-x) \sqrt {x+\sqrt {1+x^2}}} \, dx\right )-\frac {1}{2} \int \frac {1}{(1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx \\ & = -\left (\frac {1}{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 )\right )-\frac {1}{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 ) \\ & = -\left (\frac {1}{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 )\right )-\frac {1}{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 ) \\ & = -\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 )-\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 ) \\ & = -\text {Subst}\left (\int \frac {-1+x}{\sqrt {x} \left (1+2 x-x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right )+\text {Subst}\left (\int \frac {-1-x}{\sqrt {x} \left (-1+2 x+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right ) \\ & = -\left (2 \text {Subst}\left (\int \frac {-1+x^2}{1+2 x^2-x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )\right )+2 \text {Subst}\left (\int \frac {-1-x^2}{-1+2 x^2+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = -\text {Subst}\left (\int \frac {1}{1-\sqrt {2}-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\text {Subst}\left (\int \frac {1}{1+\sqrt {2}-x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\text {Subst}\left (\int \frac {1}{1-\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-\text {Subst}\left (\int \frac {1}{1+\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right ) \\ & = \frac {\arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right )}{\sqrt {-1+\sqrt {2}}}-\frac {\arctan \left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )}{\sqrt {1+\sqrt {2}}}+\frac {\text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right )}{\sqrt {-1+\sqrt {2}}}-\frac {\text {arctanh}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )}{\sqrt {1+\sqrt {2}}} \\ \end{align*}
Time = 0.21 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (-1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=-\sqrt {-1+\sqrt {2}} \arctan \left (\sqrt {-1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right )+\sqrt {1+\sqrt {2}} \arctan \left (\sqrt {1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right )-\sqrt {-1+\sqrt {2}} \text {arctanh}\left (\sqrt {-1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right )+\sqrt {1+\sqrt {2}} \text {arctanh}\left (\sqrt {1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right ) \]
[In]
[Out]
\[\int \frac {1}{\left (x^{2}-1\right ) \sqrt {x +\sqrt {x^{2}+1}}}d x\]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 301 vs. \(2 (115) = 230\).
Time = 0.26 (sec) , antiderivative size = 301, normalized size of antiderivative = 1.85 \[ \int \frac {1}{\left (-1+x^2\right ) \sqrt {x+\sqrt {1+x^2}}} \, dx=-\frac {1}{2} \, \sqrt {\sqrt {2} - 1} \log \left ({\left (\sqrt {2} + 1\right )} \sqrt {\sqrt {2} - 1} + \sqrt {x + \sqrt {x^{2} + 1}}\right ) + \frac {1}{2} \, \sqrt {\sqrt {2} - 1} \log \left (-{\left (\sqrt {2} + 1\right )} \sqrt {\sqrt {2} - 1} + \sqrt {x + \sqrt {x^{2} + 1}}\right ) + \frac {1}{2} \, \sqrt {\sqrt {2} + 1} \log \left (\sqrt {\sqrt {2} + 1} {\left (\sqrt {2} - 1\right )} + \sqrt {x + \sqrt {x^{2} + 1}}\right ) - \frac {1}{2} \, \sqrt {\sqrt {2} + 1} \log \left (-\sqrt {\sqrt {2} + 1} {\left (\sqrt {2} - 1\right )} + \sqrt {x + \sqrt {x^{2} + 1}}\right ) - \frac {1}{2} \, \sqrt {-\sqrt {2} + 1} \log \left ({\left (\sqrt {2} + 1\right )} \sqrt {-\sqrt {2} + 1} + \sqrt {x + \sqrt {x^{2} + 1}}\right ) + \frac {1}{2} \, \sqrt {-\sqrt {2} + 1} \log \left (-{\left (\sqrt {2} + 1\right )} \sqrt {-\sqrt {2} + 1} + \sqrt {x + \sqrt {x^{2} + 1}}\right ) + \frac {1}{2} \, \sqrt {-\sqrt {2} - 1} \log \left ({\left (\sqrt {2} - 1\right )} \sqrt {-\sqrt {2} - 1} + \sqrt {x + \sqrt {x^{2} + 1}}\right ) - \frac {1}{2} \, \sqrt {-\sqrt {2} - 1} \log \left (-{\left (\sqrt {2} - 1\right )} \sqrt {-\sqrt {2} - 1} + \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}{\left (x - 1\right ) \left (x + 1\right ) \sqrt {x + \sqrt {x^{2} + 1}}}\, 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]