Solution to integral curve for compactly supported functions 
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.
 A: 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}$.
A: I cannot ask this in a comment, so I'm putting it here.  Say we are in R$^1$.  We have a differential equation dx(t)/dt = g(x(t)), where x(t) is not a vector but just one function.  We know that g is integrable on $\pm \infty$ because


*

*g has compact support so we are really integrating over W, a compact set.

*g is C$^1$ so g(t) is integrable on W

*x(t) is C$^1$ so g(x(t)) is integrable on W


So x(t) = $\int g(x(t))dt$ + K exists (where K is just some constant). The integral cannot make anything less differentiable, so x(t) is certainly C$^1$.  The K can be adjusted so that x(0) is whatever you wish.
I am wondering how the interval I connects in.
Do I have this all wrong (not so unusual) or is this the kind of approach that is needed?  And if it is, can't something like it be extended to R$^n$?
