TITLE: Solution to integral curve for compactly supported functions
QUESTION [6 upvotes]: 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.

REPLY [3 votes]: This is a consequence of a standard theorem about local existence and uniqueness of solutions to ODEs. Here's one statement, taken from here, page 4:
Let $U\subset\Bbb{R}^n$ be an open set, and let $g:U\to\Bbb{R}^n$ be Lipschitz with constant $K$. Let $x_0\in U$, and suppose there is a closed ball $B_b(x_0)$ of radius $b$ contained in $U$ and centered at $x_0$, and that $\|g(x)\|\leq M$ for all $x\in B_b(x_0)$. Let $\alpha=\alpha(x_0)=b/M$, then there is a $C^1$ curve $x(t)$, $t\in[t_0-\alpha,t_0+\alpha]$ such that $x'(t) = g(x(t))$ and $x(t_0)=x_0$.
In your case, it is easy to show that the assumptions hold for every $x_0$, and you can easily show that because $\alpha(x_0)$ is always greater than some positive $\epsilon>0$, you can extend every trajectory $x(t)$ to all $t\in\Bbb{R}$.