Integrand size = 27, antiderivative size = 196 \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=2 \sqrt {x+\sqrt {1+x}}-3 \log \left (1+2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}\right )-4 \text {RootSum}\left [25-40 \text {$\#$1}+6 \text {$\#$1}^2-8 \text {$\#$1}^3+\text {$\#$1}^4\&,\frac {5 \log \left (1+2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}-\text {$\#$1}\right )+2 \log \left (1+2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}-\text {$\#$1}\right ) \text {$\#$1}+\log \left (1+2 \sqrt {1+x}-2 \sqrt {x+\sqrt {1+x}}-\text {$\#$1}\right ) \text {$\#$1}^2}{-10+3 \text {$\#$1}-6 \text {$\#$1}^2+\text {$\#$1}^3}\&\right ] \]
[Out]
Time = 0.21 (sec) , antiderivative size = 189, normalized size of antiderivative = 0.96, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {1033, 1090, 635, 212, 1046, 738, 210} \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=2 \sqrt {\frac {2}{5} \left (\sqrt {5}-2\right )} \arctan \left (\frac {-2 \left (2-\sqrt {5}\right ) \sqrt {x+1}+\sqrt {5}+3}{4 \sqrt {\sqrt {5}-1} \sqrt {x+\sqrt {x+1}}}\right )+3 \text {arctanh}\left (\frac {2 \sqrt {x+1}+1}{2 \sqrt {x+\sqrt {x+1}}}\right )+2 \sqrt {\frac {2}{5} \left (2+\sqrt {5}\right )} \text {arctanh}\left (\frac {-2 \left (2+\sqrt {5}\right ) \sqrt {x+1}-\sqrt {5}+3}{4 \sqrt {1+\sqrt {5}} \sqrt {x+\sqrt {x+1}}}\right )+2 \sqrt {x+\sqrt {x+1}} \]
[In]
[Out]
Rule 210
Rule 212
Rule 635
Rule 738
Rule 1033
Rule 1046
Rule 1090
Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {x \sqrt {-1+x+x^2}}{-1-x+x^2} \, dx,x,\sqrt {1+x}\right ) \\ & = 2 \sqrt {x+\sqrt {1+x}}-2 \text {Subst}\left (\int \frac {-\frac {1}{2}-\frac {x}{2}-\frac {3 x^2}{2}}{\left (-1-x+x^2\right ) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right ) \\ & = 2 \sqrt {x+\sqrt {1+x}}-2 \text {Subst}\left (\int \frac {-2-2 x}{\left (-1-x+x^2\right ) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )+3 \text {Subst}\left (\int \frac {1}{\sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right ) \\ & = 2 \sqrt {x+\sqrt {1+x}}+6 \text {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {1+2 \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )+\frac {1}{5} \left (4 \left (5-3 \sqrt {5}\right )\right ) \text {Subst}\left (\int \frac {1}{\left (-1+\sqrt {5}+2 x\right ) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right )+\frac {1}{5} \left (4 \left (5+3 \sqrt {5}\right )\right ) \text {Subst}\left (\int \frac {1}{\left (-1-\sqrt {5}+2 x\right ) \sqrt {-1+x+x^2}} \, dx,x,\sqrt {1+x}\right ) \\ & = 2 \sqrt {x+\sqrt {1+x}}+3 \text {arctanh}\left (\frac {1+2 \sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )-\frac {1}{5} \left (8 \left (5-3 \sqrt {5}\right )\right ) \text {Subst}\left (\int \frac {1}{-16-8 \left (-1+\sqrt {5}\right )+4 \left (-1+\sqrt {5}\right )^2-x^2} \, dx,x,\frac {-3-\sqrt {5}-2 \left (-2+\sqrt {5}\right ) \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right )-\frac {1}{5} \left (8 \left (5+3 \sqrt {5}\right )\right ) \text {Subst}\left (\int \frac {1}{-16-8 \left (-1-\sqrt {5}\right )+4 \left (-1-\sqrt {5}\right )^2-x^2} \, dx,x,\frac {-3+\sqrt {5}-\left (-2+2 \left (-1-\sqrt {5}\right )\right ) \sqrt {1+x}}{\sqrt {x+\sqrt {1+x}}}\right ) \\ & = 2 \sqrt {x+\sqrt {1+x}}+2 \sqrt {\frac {2}{5} \left (-2+\sqrt {5}\right )} \arctan \left (\frac {3+\sqrt {5}-2 \left (2-\sqrt {5}\right ) \sqrt {1+x}}{4 \sqrt {-1+\sqrt {5}} \sqrt {x+\sqrt {1+x}}}\right )+3 \text {arctanh}\left (\frac {1+2 \sqrt {1+x}}{2 \sqrt {x+\sqrt {1+x}}}\right )+2 \sqrt {\frac {2}{5} \left (2+\sqrt {5}\right )} \text {arctanh}\left (\frac {3-\sqrt {5}-2 \left (2+\sqrt {5}\right ) \sqrt {1+x}}{4 \sqrt {1+\sqrt {5}} \sqrt {x+\sqrt {1+x}}}\right ) \\ \end{align*}
Time = 0.14 (sec) , antiderivative size = 189, normalized size of antiderivative = 0.96 \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=2 \sqrt {x+\sqrt {1+x}}-3 \log \left (-1-2 \sqrt {1+x}+2 \sqrt {x+\sqrt {1+x}}\right )+4 \text {RootSum}\left [-1+6 \text {$\#$1}-3 \text {$\#$1}^2+2 \text {$\#$1}^3+\text {$\#$1}^4\&,\frac {2 \log \left (-\sqrt {1+x}+\sqrt {x+\sqrt {1+x}}-\text {$\#$1}\right )-2 \log \left (-\sqrt {1+x}+\sqrt {x+\sqrt {1+x}}-\text {$\#$1}\right ) \text {$\#$1}+\log \left (-\sqrt {1+x}+\sqrt {x+\sqrt {1+x}}-\text {$\#$1}\right ) \text {$\#$1}^2}{3-3 \text {$\#$1}+3 \text {$\#$1}^2+2 \text {$\#$1}^3}\&\right ] \]
[In]
[Out]
Time = 0.13 (sec) , antiderivative size = 403, normalized size of antiderivative = 2.06
method | result | size |
derivativedivides | \(\frac {2 \left (\sqrt {5}-1\right ) \sqrt {5}\, \left (\frac {\sqrt {\left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )-\sqrt {5}+1}}{2}+\frac {\left (2-\sqrt {5}\right ) \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )-\sqrt {5}+1}\right )}{4}+\frac {\left (-\sqrt {5}+1\right ) \arctan \left (\frac {-2 \sqrt {5}+2+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}{2 \sqrt {\sqrt {5}-1}\, \sqrt {\left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )-\sqrt {5}+1}}\right )}{2 \sqrt {\sqrt {5}-1}}\right )}{5}+\frac {2 \left (\sqrt {5}+1\right ) \sqrt {5}\, \left (\frac {\sqrt {\left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )+\sqrt {5}+1}}{2}+\frac {\left (2+\sqrt {5}\right ) \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )+\sqrt {5}+1}\right )}{4}-\frac {\sqrt {\sqrt {5}+1}\, \operatorname {arctanh}\left (\frac {2 \sqrt {5}+2+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}{2 \sqrt {\sqrt {5}+1}\, \sqrt {\left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )+\sqrt {5}+1}}\right )}{2}\right )}{5}\) | \(403\) |
default | \(\frac {2 \left (\sqrt {5}-1\right ) \sqrt {5}\, \left (\frac {\sqrt {\left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )-\sqrt {5}+1}}{2}+\frac {\left (2-\sqrt {5}\right ) \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )-\sqrt {5}+1}\right )}{4}+\frac {\left (-\sqrt {5}+1\right ) \arctan \left (\frac {-2 \sqrt {5}+2+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}{2 \sqrt {\sqrt {5}-1}\, \sqrt {\left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2-\sqrt {5}\right ) \left (\sqrt {1+x}+\frac {\sqrt {5}}{2}-\frac {1}{2}\right )-\sqrt {5}+1}}\right )}{2 \sqrt {\sqrt {5}-1}}\right )}{5}+\frac {2 \left (\sqrt {5}+1\right ) \sqrt {5}\, \left (\frac {\sqrt {\left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )+\sqrt {5}+1}}{2}+\frac {\left (2+\sqrt {5}\right ) \ln \left (\frac {1}{2}+\sqrt {1+x}+\sqrt {\left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )+\sqrt {5}+1}\right )}{4}-\frac {\sqrt {\sqrt {5}+1}\, \operatorname {arctanh}\left (\frac {2 \sqrt {5}+2+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )}{2 \sqrt {\sqrt {5}+1}\, \sqrt {\left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )^{2}+\left (2+\sqrt {5}\right ) \left (\sqrt {1+x}-\frac {\sqrt {5}}{2}-\frac {1}{2}\right )+\sqrt {5}+1}}\right )}{2}\right )}{5}\) | \(403\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 3 vs. order 1.
Time = 9.19 (sec) , antiderivative size = 518, normalized size of antiderivative = 2.64 \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=-\frac {1}{5} \, \sqrt {5} \sqrt {2} \sqrt {\sqrt {5} + 2} \log \left (\frac {4 \, {\left (\sqrt {2} {\left (3 \, x^{2} + \sqrt {5} {\left (x^{2} + 3 \, x - 1\right )} + 4 \, {\left (2 \, x + \sqrt {5} - 1\right )} \sqrt {x + 1} + x + 5\right )} \sqrt {\sqrt {5} + 2} + 4 \, {\left ({\left (\sqrt {5} x + x + 2\right )} \sqrt {x + 1} + \sqrt {5} {\left (x + 1\right )} + 3 \, x + 1\right )} \sqrt {x + \sqrt {x + 1}}\right )}}{x^{2} - x - 1}\right ) + \frac {1}{5} \, \sqrt {5} \sqrt {2} \sqrt {\sqrt {5} + 2} \log \left (-\frac {4 \, {\left (\sqrt {2} {\left (3 \, x^{2} + \sqrt {5} {\left (x^{2} + 3 \, x - 1\right )} + 4 \, {\left (2 \, x + \sqrt {5} - 1\right )} \sqrt {x + 1} + x + 5\right )} \sqrt {\sqrt {5} + 2} - 4 \, {\left ({\left (\sqrt {5} x + x + 2\right )} \sqrt {x + 1} + \sqrt {5} {\left (x + 1\right )} + 3 \, x + 1\right )} \sqrt {x + \sqrt {x + 1}}\right )}}{x^{2} - x - 1}\right ) - \frac {1}{20} \, \sqrt {5} \sqrt {-32 \, \sqrt {5} + 64} \log \left (-\frac {4 \, {\left (2 \, x - \sqrt {5} - 1\right )} \sqrt {x + 1} \sqrt {-32 \, \sqrt {5} + 64} + 16 \, {\left ({\left (\sqrt {5} x - x - 2\right )} \sqrt {x + 1} + \sqrt {5} {\left (x + 1\right )} - 3 \, x - 1\right )} \sqrt {x + \sqrt {x + 1}} + {\left (3 \, x^{2} - \sqrt {5} {\left (x^{2} + 3 \, x - 1\right )} + x + 5\right )} \sqrt {-32 \, \sqrt {5} + 64}}{x^{2} - x - 1}\right ) + \frac {1}{20} \, \sqrt {5} \sqrt {-32 \, \sqrt {5} + 64} \log \left (\frac {4 \, {\left (2 \, x - \sqrt {5} - 1\right )} \sqrt {x + 1} \sqrt {-32 \, \sqrt {5} + 64} - 16 \, {\left ({\left (\sqrt {5} x - x - 2\right )} \sqrt {x + 1} + \sqrt {5} {\left (x + 1\right )} - 3 \, x - 1\right )} \sqrt {x + \sqrt {x + 1}} + {\left (3 \, x^{2} - \sqrt {5} {\left (x^{2} + 3 \, x - 1\right )} + x + 5\right )} \sqrt {-32 \, \sqrt {5} + 64}}{x^{2} - x - 1}\right ) + 2 \, \sqrt {x + \sqrt {x + 1}} + \frac {3}{2} \, \log \left (4 \, \sqrt {x + \sqrt {x + 1}} {\left (2 \, \sqrt {x + 1} + 1\right )} + 8 \, x + 8 \, \sqrt {x + 1} + 5\right ) \]
[In]
[Out]
Not integrable
Time = 0.67 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.10 \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\int \frac {\sqrt {x + \sqrt {x + 1}}}{x - \sqrt {x + 1}}\, dx \]
[In]
[Out]
Not integrable
Time = 0.22 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.12 \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\int { \frac {\sqrt {x + \sqrt {x + 1}}}{x - \sqrt {x + 1}} \,d x } \]
[In]
[Out]
Result contains higher order function than in optimal. Order 3 vs. order 1.
Time = 0.70 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.08 \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=-8 \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{5}} {\left (\arctan \left (2\right ) + \arctan \left (\frac {1}{2} \, \sqrt {\sqrt {5} + 1} {\left (\sqrt {x + \sqrt {x + 1}} - \sqrt {x + 1}\right )} - \frac {1}{2} \, \sqrt {\sqrt {5} - 1}\right )\right )} + 4 \, \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{5}} \log \left ({\left | 4 \, \sqrt {5} \sqrt {10 \, \sqrt {5} + 20} + 20 \, \sqrt {5} + 40 \, \sqrt {x + \sqrt {x + 1}} - 40 \, \sqrt {x + 1} - 20 \, \sqrt {10 \, \sqrt {5} + 20} + 20 \right |}\right ) - 4 \, \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{5}} \log \left ({\left | -4 \, \sqrt {5} \sqrt {10 \, \sqrt {5} + 20} + 20 \, \sqrt {5} + 40 \, \sqrt {x + \sqrt {x + 1}} - 40 \, \sqrt {x + 1} + 20 \, \sqrt {10 \, \sqrt {5} + 20} + 20 \right |}\right ) + 2 \, \sqrt {x + \sqrt {x + 1}} - 3 \, \log \left (-2 \, \sqrt {x + \sqrt {x + 1}} + 2 \, \sqrt {x + 1} + 1\right ) \]
[In]
[Out]
Not integrable
Time = 6.37 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.12 \[ \int \frac {\sqrt {x+\sqrt {1+x}}}{x-\sqrt {1+x}} \, dx=\int \frac {\sqrt {x+\sqrt {x+1}}}{x-\sqrt {x+1}} \,d x \]
[In]
[Out]