Let $f$ be a smooth function defined on the unit disc $D \subset \mathbf{R}^2$ with \begin{equation} f \geq 0 \text{ in $D$ and } f(0) = 0. \end{equation} Note that we do not assume that thisThis is allowed to have a non-degeneratedegenerate minimum at the origin, namely it is allowed that $D^2 f(0) = 0.$
Question. When is there $\rho \in (0,1)$ and $u \in C^1(D_\rho)$ so that $\lvert D u \rvert^2 = (\partial_x u)^2 + (\partial_y u)^2 = f$$\lvert D u \rvert^2 = f$? I would be more than happy with an answer specialised to the case where $f$ is the polynomial $(xy)^{2N}$—say with $N \geq 2$—if a general discussion is too onerous.
As far as I understand, the equation was initially considered with a strictly positive right-hand side. One classical example is where $\lvert \nabla u \rvert^2_g = 1$, with respect to the some Riemannian metric $g$ on $D$. One may attempt to rescale the Euclidean metric to $g = f^2 g_e$, in order to get $\lvert \nabla u \rvert_g^2 = f^{-2} \lvert \nabla u \rvert_{g_e} = 1$. However $g$ is unfortunately degenerate where $f = 0$.
When the zero of $f$ at the origin is non-degenerate, then one can construct a solution to the eikonal equation via a sort of dynamic argument, as is explained in this answer.