Consider $$g(x) = \cases{ 1 & $x < 0$ \\ 2 & $x\geq0$}$$

and the differential equation $x'=g(x).$ Prove that there is no solution if we set $x(0)=0$.

My idea is that the differential equation $\frac{dx}{dt}=g(x)$ can be solved by $\displaystyle{\int\frac{1}{g(x)}dx}=t$. Now suppose $x(0)=0$; we set $t=0$ in the former equation and looks like it must be $\displaystyle{\int\frac{1}{g(x)}dx}=0$, but this can't be because $g(x)>0$ which implies $\displaystyle{\int\frac{1}{g(x)}dx}>0$.

Is this a correct argument?

  • 1
    $\begingroup$ Is $g(0)$ equal to $1$ or $2$...? Anyway you probably want a differentiable solution to write $x'$, do you see how that could be a problem? $\endgroup$ Oct 27, 2014 at 12:53
  • $\begingroup$ Hi. Is $g(0)=2$, I just fixed it. $\endgroup$
    – Cure
    Oct 27, 2014 at 12:55
  • $\begingroup$ Then there is a solution: x(t)=2t for every nonnegative t. $\endgroup$
    – Did
    Oct 27, 2014 at 12:56
  • $\begingroup$ What would be wrong with the solution $x(t)=t.g(t)$, except that it is not differentiable at $t=0$ ? $\endgroup$
    – user65203
    Oct 27, 2014 at 12:59
  • $\begingroup$ You need to swap one of the inequality signs in the definition of $g$. I cleaned up the source code, but i cannot tell offhand which is supposed to be which way. $\endgroup$
    – Arthur
    Oct 27, 2014 at 13:00

2 Answers 2


Your argument is not correct as the solution is $$\int\frac{dx}{g(x)}=t+C.$$ Anyway, $x'(t)$ is positive so that $x(t)$ is strictly increasing. Given $x(0)=0$, we have $x(-h)<0$ and $x(h)>0$, so that by the equation $x'(-h)=1$ and $x'(h)=2$, then integrating, $x(-h)=-h$ and $x(h)=2h$.

Taking the limit $h\to0$, $x'(t)$ is not defined at $t=0$, though we expected it to be $2$, a contradiction.

Actually, whatever the initial condition there is always a $t$ such that $x(t)=0$ and a solution never exists.

  • $\begingroup$ You're right, I messed it up. But is what I was asked to prove possible?. If it is, then the problem to find such solution is that is not possible to find an $x$ differentiable for every $t$?. $\endgroup$
    – Cure
    Oct 27, 2014 at 13:13

The non-differentiability of $g$ doesn't enter in to it, all Cure's argument depends on is that $g$ is positive everywhere. The error comes from


which is only true up to a (usually implicitly assumed) arbitrary constant. By letting that slide and simply substituting in $t=0$, you've invalidated the actual solution.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .