Can a solution to an ODE/PDE stop solving the equation without losing regularity? Suppose you have an initial value problem for a possibly non-linear ODE $$ \frac{dy}{dt} = f(t,y(t)), \hspace{20pt} y(t_{0}) = y_{0}, $$ where $f$ is Lipschitz continuous in $t$ and $y$ for now.
Suppose we know that there exists a solution on $[0,T^{*})$.
Question: Is it possible for a solution to stay regular for all time but  it stops solving the ODE from some time $T$ onwards?
In other words, to prove the global existence of a solution, is it enough to show that the solution does not lose regularity? I don't know if this is a dumb question but it doesn't seem obvious to me. Does anything change in the PDE setting?
 A: It is possible even when $f(t, y)$ is $C^\infty$.  Consider the initial value problem
$$ y'(t) = f(t), \ y(-1) = 0$$
where
$$ f(t) = \cases{e^{-1/t} & for $t > 0$\cr
                 0 & for $t \le 0$\cr} $$
is a standard example of a $C^\infty$ function that is not analytic.
Then $y(t) = 0$ is analytic everywhere, and is a solution of the equation for $t \le 0$, but not for $t > 0$.
A: Consider the ODE
$$ \frac{dy}{dt}= |T^*-t|$$
On $[0,T^*),$ it has the unique smooth, even real analytic, solution
$$y(t)=c+T^* t-\frac{t^2}{2}$$
where the constant $c$ depends on the initial condition. This function does not lose any regularity after $T^*,$ still it stops being a solution at this time.
PDE's are much more complicated, there is no Picard-Lindelöf theorem so things can fail in even worse ways: An example by Hans Lewy, see here, shows that you can have a linear PDE
$$Lu(t,x)=f(t)$$
where $L$ is a linear differential operator and $f$ smooth with a real analytic solution $u_0$ which exists as a real analytic function for $t$ up to some $T'$ but only solves the PDE up to $t<T^*$ with $T^*$ strictly smaller than $T'.$ What's more, the PDE has no solutions for $t=T^*.$
