For an HJB equation like this,
$$ \frac{dV(t,x)}{dt}+max(H1(V,x),H2(V,x),H3(V,x))=0 $$
I try to solve it with Euler scheme until the actions becomes steady. I find when x<=x0, the optimal action is H1, but when x>x0, at each integration time step, the optimal action switches between H2 and H3. I also find that the diffirence between H2 and H3 is generally smaller than 1e-14, which seems to be round off error. How to make the selection of optimal action more stable when x>x0?