How to solve an ODE with an absolute value?

80 Views Asked by At

I am a bit confused about how to solve an ODE of this type

$y'= \mid x \mid - \mid y \mid $ , $y(0)=0$

Do I need to divide the ODE into four phases :

  1. $x>0$ & $y>0$

  2. $x>0$ & $y<0$

  3. $x<0$ & $y>0$

  4. $x<0$ & $y<0$

or is there another approach?