<s>[INST] Computing $\int\frac {du}{\sqrt{u^2 + s^2}} =\log \lvert (u + \sqrt{u^2 + s^2}) \rvert$ with a substitution Can someone please show me where I am going wrong? It seems there is a contradiction in the formula for the the following integral. 
$$\int\frac {du}{\sqrt{u^2 + s^2}} = \log \bigl\lvert u + \sqrt{u^2 + s^2}\bigr\rvert$$
Now, can't we rewrite the integral as follows using the substitution z = -u?
\begin{align}
\int\frac {du}{\sqrt{u^2 + s^2}} &= \int\frac {du}{\sqrt{(-u)^2 + s^2}} = \int\frac {-dz}{\sqrt{z^2 + s^2}}\\
& = -\log \bigl\lvert z + \sqrt{z^2 + s^2}\bigr\rvert = -\log \bigl\lvert (-u + \sqrt{u^2 + s^2})\bigr\rvert
\end{align}
But, clearly $\;\log \bigl\lvert u + \sqrt{u^2 + s^2}\bigr\rvert \ne -\log \bigl\lvert -u + \sqrt{u^2 + s^2} \bigr\rvert$
Also, the quantity inside $\log \bigl\lvert u + \sqrt{u^2 + s^2})\bigr\rvert$ is clearly non-negative for any choice of $u$ and $s$, so why do we need the absolute value of the quantity in our integral? 
 [/INST] Both are not equal . But you'll get a term which will get added to the arbitrary constant and get cancelled in definite integral.
$$I=-\log|-u+\sqrt{u^2+s^2}|+c = \log\bigg\vert\frac{1}{-u+\sqrt{u^2+s^2}}\bigg\vert+c$$ 
$$I = \log\bigg\vert\frac{u+\sqrt{u^2+s^2}}{-u^2+u^2+s^2}\bigg\vert+c=\log\vert u+\sqrt{u^2+s^2}\vert-\log s^2+c = \log\vert u+\sqrt{u^2+s^2}\vert +k$$
where $k=c-\log s^2$
And this gets cancelled in a definite integral, so both are equivalent.
</s>