I apologize in advance for the imprecise question but I don't really know what I am looking for here. In doing classwork I have come across various limits where the obvious substitution would be $t=x^2$.
For example, in the case of the limit $$\lim_{x\to 0}(\cos(x))^{-\frac{4}{x^2}}=\lim_{x\to 0}\left(1-\frac{x^2}{2}\right)^{-\frac{4}{x^2}}$$ I would substitute $t=-\frac{2}{x^2}$ which would however imply that $x=\pm \sqrt{-\frac{2}{t}}$
This does lead to the correct result, $e^2$, but it feels like this would restrict the domain of $t$ to $(-\infty;0]$ so the answer feels incomplete or as though it would need some extra consideration. I would appreciate any pointers to what could be a more complete or formally correct solution. Thank you.