Let's consider the following integral:
$$\int \frac {e^x \sqrt{e^x - 1}}{e^x+3}\,dx$$
And let's take the substitution $t^2=e^x-1$. Then, we get $2tdt=e^xdx$ and so:
$$\int \frac {e^x \sqrt{e^x - 1}}{e^x+3}\,dx = 2\int \frac {t \sqrt{t^2}}{t^2+4}\,dt$$
So, can we take $\sqrt{t^2}=t$ there? It seems to me that we could do that only if we say at the beginning, when we took the substitution, that $t$ is non-negative. However, I've never seen that anybody has written anything like that in any solution of antiderivative problems. So, if we want to be formal, should we write that we take non-negative $t$?
It makes a difference on how we define our substituition.By taking $e^x-1=t^2$ we could have $t=\pm\sqrt{e^x-1}$.
To avoid this problem I would take $\sqrt{e^x-1}=t$ which would automatically mean $t\ge 0$. Hence we have to evaluate $$2\int \frac{t^2dt}{t^2+4}$$ which is easy to do by hand...