<s>[INST] Indefinite integral question: $\int \frac{1}{x\sqrt{x^2+x}}dx$ How can I solve this integral: $$\int \frac{1}{x\sqrt{x^2+x}}dx$$ I first completed the square and got: $$\int \frac{1}{x\sqrt{(x+\frac{1}{2})^2-\frac{1}{4}}}dx$$ Then I factored out 1/4 and got: $$2\int \frac{1}{x\sqrt{(2x+1)^2-1}}dx$$ Then I substituted $2x+1$ with $t$ and got: $$2\int \frac{1}{(t-1)\sqrt{t^2-1}}dt$$ I'm not sure what to do next. Please give me a hint ;)
 [/INST] Here is an approach.
$$
\begin{align}
\int \frac{1}{x \sqrt{x^2+x}}dx &=\int \frac{1}{\sqrt{1+\frac{1}{x}}}\frac{dx}{x^2}\\\\
&=-\int \frac{1}{\sqrt{1+u}}\:du \quad (u=1/x)\\\\
&=-2\sqrt{u+1}+C\\\\
&=-2\sqrt{\frac{x+1}{x}}+C
\end{align}
$$ where $C$ is any constant.
</s>