# Prove or give a counterexample that the maximal solutions of an autonomous differential equation are global

I'm not finding a counterexample or a proof that given a autonomous differential equation $y' = f(y)$ defined on a limited open set $U$ (i.e., a set with compact closure), then the maximal solutions are global, i.e., defined on $\mathbb{R}$. I suspect that this statement is false, however I could not find any counterexample. Thanks in advance.

-
what happens if the maximal solution necessarily blows up in finite time? – Alex R. Sep 14 '12 at 0:43
@Sam what do you mean by "what happens"?I think that the solution can't blow up since $y$ is limited by hypothesis. – user40276 Sep 14 '12 at 2:18

The solution does not blow-up (it remains bounded), but may not be defined on all of $\mathbb{R}$.
Consider consider the equation $$y'=\frac{1}{\cos y},\quad y(0)=0,$$ where the right hand side is defined on $(-\pi/2,\pi/2)$. The solution is $y=\arcsin x$, which is defined on $(-1,1)$. As $x\to\pm1$, $y$ does not blow-up, but the point $(x,y(x))$ converges to the boundary of the domain of definition of the equation, $\mathbb{R}\times(-\pi/2,\pi/2)$.