Let $U\subseteq\mathbb{R}^n$ be an open subset, and let $g:U\rightarrow\mathbb{R^n}$ be a $C^1$ function. Let $x_1(t),\ldots,x_n(t)$ be $C^1$ functions on an open interval $I\subseteq\mathbb{R}$. Write $x(t)=(x_1(t),\ldots,x_n(t))$. Consider the equation $$\dfrac{dx}{dt}(t)=g(x(t))$$ Call that equation $(*)$. Suppose that there exists a compact set $W$ such that $g(x)=0$ for all $x\not\in W$, and let $x_0\in U$. Prove that there exists a solution $x(t)$ to $(*)$ for $t\in(-\infty,\infty)$ such that $x(0)=x_0$.
Fix $x_0\in U$. If $g(x_0)=0$, we could just take the constant solution $x(t)=x_0$ which clearly satisfies $(*)$.
So we can consider the case $g(x)\neq 0$. I don't know what to do in this case.