<s>[INST] integration of $\frac{x}{(x^2-1)^\frac{1}{2}}$ When I use the substitution $u=\cosh x$ to integrate $\frac{x}{(x^2-1)^\frac{1}{2}}$, I get $\frac{1}{2}(x+\sqrt{x^2-1}-\frac{1}{x+\sqrt{x^2-1}})$ but when I check online the answer is $\sqrt{x^2-1}$ which is much tidier. I'm probably being thick, but how can my answer be simplified to $\sqrt{x^2-1}$? and if it can't, is there a reason why I got a different answer to the integral?
 [/INST] Your answer is correct:
\begin{align}
\frac{1}{2}(x+\sqrt{x^2-1}-\frac{1}{x+\sqrt{x^2-1}})&=\frac{1}{2}(x+\sqrt{x^2-1}-\frac{1}{x+\sqrt{x^2-1}}\times \frac{x-\sqrt{x^2-1}}{x-\sqrt{x^2-1}})\\
&=\frac{1}{2}(x+\sqrt{x^2-1}-\frac{x-\sqrt{x^2-1}}{x^2-(x^2-1)})\\
&=\frac{1}{2}(x+\sqrt{x^2-1}-x+\sqrt{x^2-1})\\
&=\sqrt{x^2-1}
\end{align}
</s>