First, some terminology: given functions $g,f:Y \leftarrow X$, the equalizer of $g$ and $f$ is defined to be the set of all solutions $x \in X$ to the equation $g(x)=f(x)$ in $Y$. Okay. The following seems to be a general phenomenon: given any two sufficiently well-behaved functions $g,f : \mathbb{R} \leftarrow \mathbb{R}^2$ with $g$ distinct from $f$, it tends to be the case that the equalizer of $g$ and $f$ can be broken up into discrete "parts" in a natural way, such that each part can be parametrized by a well-behaved function $\mathbb{R}^2 \leftarrow \mathbb{R}$. For example, if I type $$xe^y = y \cos(x)$$ into Wolfram Alpha, I get...
...which looks like it can be broken up into subsets that can each be viewed as parametrized by $\mathbb{R}$ via a smooth function.
Similarly, if I type $$xe^y = ye^x,$$ I get...
...which (once again) looks like distinct pieces, each of which can be parametrized by $\mathbb{R}$.
Now the equalizer of $g$ and $f$ just the equalizer of $g-f$ and $0$, or in other words the set of zeros of $g-f$. So we can simplify the question by thinking about the zeros of functions.
Question. What frameworks and/or theorems are available to make sense of this phenomenon whereby for all sufficiently well-behaved functions $h : \mathbb{R} \leftarrow \mathbb{R}^2$ distinct from the zero function $0 : \mathbb{R} \leftarrow \mathbb{R}^2$, we find that the roots of $h$ can be broken up into pieces, each of which can be parametrized by $\mathbb{R}$?

