Existence result for a one-dimensional eikonal equation