Everywhere continuous solution $y(x)$ to ODE $y'(x)=f(x)$ with piece-wise continuous $f(x)$ While looking for uniqueness results for an initial value problem, I stumbled upon the following problem. Consider a simple first-order ODE with $$y'(x)=f(y(x),x)$$ with initial value $y(0)=y_0$. Suppose that $f(y(x),x)$ is piece-wise continuous, say with a discontinuity at $x_0$, and bounded everywhere; e.g., $$f(y(x),x)=\begin{cases} g(y(x),x)&, \text{ if }x<x_0 \\h(y(x),x)&,\text{ if }x\geq x_0 \end{cases}.$$ Both $g(y(x),x)$ and $h(y(x),x)$ are continuous everywhere.
Intuitively, I can apply a simple Picard-Lindeloef theorem on $[0,x_0)$ and get a unique solution in that interval.
Now, if I have an initial condition on $[x_0,\overline{x}]$, I could do the same and would have found a unique solution by stacking the two together. However, in principle, there could be infinitely many initial condition at $x_0$ such that the solution solves the initial value problem. However, I am searching for the solution such that the initial value at $x_0$ is the left-limit of $y(x)$ before the discontinuity of $f(y(x),x)$, i.e., with initial condition $y(x_0)=\lim_{x \uparrow x_0} y(x)$.
I am wondering whether this is the "standard" approach to deal with such a setting or whether this is in some regard special. How would one usually deal with such piece-wise continuous $f$?
 A: In order for $y$ to satisfy a differential equation, $y$ has to be differentiable, which in turn implies $y$ is continuous. Thus demanding that $y$ be continuous at the seam is the "standard" way to treat such a situation.
Be aware, though, that while the derivative of $y$ does not have to be continuous, the ways in which it can exist at every point but not be continuous are limited. So for many $f$, there may not be a full solution $y$ that satisfies the equation everywhere, including at $x_0$. Thus one might choose to loosen the requirements on the solution $y$ so it need not exist at $x_0$. However, with no other condition added, doing so causes the solution to no longer be unique, as you have noted. You can choose any boundary condition at $x_0$ and obtain a solution to $y' = f(y,x), y(0) = y_0$ which solves the equation everywhere except at $x_0$.
But that does not mean one must assume $y$ is continuous at $x_0$. There is no universal requirement that must be met here. What requirement you should put on $y$ at $x_0$ is not supplied by general mathematical reasoning, but by what application you are making of the solution $y$. We generally model physical processes as continuous. This is possible because the measurements they are modelling are only well-defined up to a limited accuracy. Within this uncertainty one can always fit a continuous, indeed an infinitely differentiable, function.
But if your application is not some physical model, it may not be necessary or even appropriate to assume continuity. In such a case you would need to look elsewhere to figure out what condition at $x_0$ or higher $x$ must be met to give you the appropriate solution.
