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$?
 A: 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$$
