Consider $\lim_{x \to 0}(\text{sgn}(x^2))$.
There is an identity for solving limits of composite functions, which states that if $\lim_{x \to a}(f(x)) = b$ and $\lim_{x \to b}(g(x)) = c$, then $\lim_{x \to a}(g(f(x))) = c$.
I want to use this identity to solve $\lim_{x \to 0}(\text{sgn}(x^2))$. And yes, I am aware that there are other ways of solving this limit, but I want to solve it using composite functions. If we set $f(x) = x^2$ and $g(x) = \text{sgn}(x)$, then we have $\lim_{x \to a}(f(x)) = \lim_{x \to 0}(x^2) = 0 = b$. Then $\lim_{x \to b}(g(x)) = \lim_{x \to 0}(\text{sgn}(x))$, which does not exist since sgn is approaching different values as $x$ approaches $0$ from both sides. This means we cannot solve this limit using composite functions so we have to find a different approach.
I am going to make an adjustment to the identity for solving limits of composite functions in order to solve this limit and others like it.
First I am going to take a look at a similar approach using variable substitution, but which actually works. If we let $u = x^2$, then $\lim_{x \to 0}(x^2) = 0$ and $\lim_{u \to 0}(\text{sgn}(u)) = 1$, therefore $\lim_{x \to 0}(\text{sgn}(x^2)) = 1$. The reason it's different this time is because we can take into account the set of possible values of $u$, which is given by the range of $x^2$, which is $[0, \infty)$. There is only one possible direction for $u$ to approach $0$ from, and that is the positive side. So $\lim_{u \to 0}(\text{sgn}(u))$ is essentially the same thing as $\lim_{u \to 0}(\text{sgn}(u) \text{ for } u \ge 0)$, which is essentially the same thing as $\lim_{u \to 0^+}(\text{sgn}(u))$, which is just 1.
Here is how I would fix the identity. If $\lim_{x \to a}(f(x)) = b$ and $\lim_{x \to b}(g\vert_{\text{ran}(f) \; \cap \; \text{dom}(g)}(x)) = c$, then $\lim_{x \to a}(g(f(x))) = c$.
Are there any problems with this identity?