Vectors fields structurally stable

(This was a question on my doctoral qualifying exam.)

Let be $X$ a vector field defined in $\mathbb{R}^2$ such that $X$ is structurally stable in every compact set of $\mathbb{R}^2$. Is $X$ structurally stable in $\mathbb{R}^2$?

-
It would be helpful to have a precise definition of structurally stable here. For example, the field $\vec f(\vec x)=\vec x/(|\vec x|^2+1)$ can be perturbed near infinity by rotating each vector 90 degrees clockwise, thus changing the orbits from lines to circles. This is a slight perturbation because $\vec f(\vec x)$ is small to begin with (and $C^1$ norm of the perturbation can be controlled too.) Is this a counterexample? – user53153 Dec 28 '12 at 1:40
A vector field is structurally stable if the topological behaviour of its orbits does not change under small perturbations of the vector field. Formally we say that $X$ is structurally stable if there exists a neighbourhood $V$ of $X$ such that every $Y \in V$ is topologically equivalent to $X$. – Bruno Freitas Dec 28 '12 at 16:20
Neighborhood in which topology? I understand that on bounded sets one would use $C^1(\Omega)$ metric. But I'm not sure about unbounded domains: should it be $C^1(\mathbb R^2)$ (uniform convergence on the plane, with 1st derivative), or locally uniform convergence, with 1st derivative? – user53153 Dec 28 '12 at 16:44
Neighborhood in topology $C^1(\mathbb{R}^2)$, uniform convergence on the plane, with 1st derivative. I believe the example given above is a counterexample. Thanks. – Bruno Freitas Dec 29 '12 at 0:33
Actually, it's not: the field is not stable near the origin. I'll fix this in the actual answer. – user53153 Dec 29 '12 at 0:54

Let $\{e_1,e_2\}$ be the standard basis of $\mathbb R^2$. Consider the vector field $f(x)=e_1/(|x|+1)$ in the plane ($x\in \mathbb R^2$). The orbits of $f$ are horizontal lines.
Claim 1. On any disk $D=\{x:|x|<R\}$ all sufficiently small perturbations of $f$ preserve the topological structure of orbits. Indeed, as long as the perturbation $\eta$ satisfies $\|\eta\|_{C^0}<\frac12 \min_D|f|=\frac{1}{2(R+1)}$, the vectors $f+\eta$ form an angle at most $\pi/6$ with the positive direction of the $x$-axis. Therefore, the orbits of $f+\eta$ foliate the disk by graphs of slope at most $\tan(\pi/6)$.
Claim 2. $f$ is not structurally stable on $\mathbb R^2$. Indeed, let $g(x)=(Rx)/(|x|^2+1)$ where $R$ is rotation by $\pi/2$, say clockwise. Given small $\epsilon>0$, pick a smooth cut-off function $\phi\in C_c^{1}(\mathbb R^2)$ such that $\sup |\nabla \phi|<\epsilon$ and $\phi(x)=1$ whenever $|x|\le \epsilon^{-1}$. Define $\widetilde f=\phi f+(1-\phi) g$. Some of the orbits of $\widetilde f$ are closed because $\widetilde f = g$ outside of a compact set. On the other hand, $$\|f-\widetilde f\|_{C^1(\mathbb R^2)}\le \sup_{\mathbb R^2}|\nabla \phi|+\sup_{\mathbb R^2} \big[(1-\phi)(|f|+|g|)\big]\lesssim \epsilon$$