# Example for a a unique solution to initial value problem of a nowhere continuous function

I'm looking for an example of a function g: $\mathbb R^3 \rightarrow \mathbb R$ that is discontinuous in every (x, $y_1, y_2) \in \mathbb R^3$, yet every initial value problem $$y' = g(x,y)$$ $$y(x_0)=y_0, (x_0, y_{01}, y_{02}) \in\mathbb R^3$$ has a unique solution in $\mathbb R$.

The first thing that came to mind was the Dirichlet function, but since it has neither derivative nor Riemann-integral it doesn't seem very helpful.

• You say $g$ has $\mathbb R^3$ as a domain, but then you write $g(x,y)$. – Git Gud May 24 '14 at 9:19
• That's what the assignment says. I suppose a second order differential equation is meant, interpreted as a two dimensional system. – red May 24 '14 at 9:31

Think of $\mathbb R^n$ as being filled (foliated) with integral curves of some (reasonable) ODE $\dot {\mathbf y} = \mathbf f(\mathbf y)$. On each integral curve, multiply $\mathbf f$ by a positive constant $c$. The integral curve will not change. The constants you use may be different for different integral curves, thus making $c\mathbf f$ discontinuous.
Concrete example: $\dot {\mathbf y} = \mathbf g(\mathbf y)$ where $\mathbf g(\mathbf y)=(1,0)$ if $y_2\in \mathbb Q$ and $\mathbf g(\mathbf y)=(2,0)$ if $y_2\notin \mathbb Q$.