Let $U \subset \mathbb{R}^n$ be open, $K\subset U$ be compact, and $f : [t_0, t_0 + T]\times U \to \mathbb{R}^n$ be a Caratheodory function. Show that there exist $\tau > 0$, which may depend on $K$, such that the initial-value problem $$ \begin{cases} x'(t) = f(t, x(t)),\qquad t>0,\\ x(t_0) = x_0, \end{cases} $$ has a generalized solution on $[t_0, t_0 + \tau]$ for every $x_0 \in K$.
From a theorem, for any $x_0 \in U$, there exists $\tau$ such that the ODE has a generalized solution in the interval $[t_0, t_0 + \tau]$. The value of $\tau$ may depend on the chosen $x_0$.
So for such $\tau$ to be applicable to all $x_0 \in K$, I am thinking of taking its infimum and prove the existence of a generalized solution in the obtained interval. BUT I did not use the assumption of $K$ being compact which makes me really doubt my train of thought. Guide me on how to prove this please. Thank you very much!