When can you use a triangle to represent trig substitution?
It has to do with the "permanence of functional equations":
Any trig function $f$ (as, e.g., $\cos$ or $\tan$) can be extended in a natural way to an analytic function $f:\ \Omega_f\to{\mathbb C}$ with some domain $\Omega_f\subset{\mathbb C}$. Consider now a trig identity of the form $$\bigl(\phi(z):=\bigr)\quad p\bigl(f(z),g(z)\bigr)\equiv0\ ,$$ where $f$ and $g$ are trig functions and $p$ is a polynomial in two variables (there are also other types, involving, e.g., shifting or doubling the argument). A simple example would be the identity $$\cos^2 z+\sin^2 z-1\equiv0\ .$$ If you can prove such an identity for all $z=z_n$ for a sequence $(z_n)_{n\geq0}$ converging to a point $z_*\in\Omega:=\Omega_f\cap\Omega_g$ then by a standard theorem in complex analysis it is automatically true for all $z\in\Omega$, because the analytical function $\phi:\ \Omega\to{\mathbb C}$ has to be $\equiv0$ in this case.
In particular it is sufficient to prove such an identity for all real $z$ in the interval $\ \bigl]0,{\pi\over2}\bigr[\ $.
The reason you don't have to worry about if it is obtuse is because of the range if the inverse trig functions , ex.) the range of $\arcsin(x)$ is $[-\pi/2 ,\pi/2]$ . And normally if you use the right trig function you shouldn't get the side of a triangle to be negative when it comes to the case of trig substitution. I know this answer was pretty vague and if you need any more info just comment on it but what you should get out of it is that the inverse trig functions restrict the angles