# Solve |\nabla u|^2=1

I need all solutions of $(\partial_x u)^2+(\partial_y u)^2=1$ for the function $u(x,y)$. Of course I know simple solutions like $u=ax \pm \sqrt{1-a^2}y + c$, or $u=\sqrt{x^2+y^2}+c$; but what's the general solution?

More generally, I'd like to know how to tackle a PDE of the form $|\nabla u|^2=f^2(u)$ where $f$ is some given function. Again a simple solution is to assume that $u$ is a function of $r=\sqrt{x^2+y^2}$ and integrate the equation. But what's the most general solution?

• @Mahdiyar: Look up the literature on the eikonal equation, which this is. There, you will see that the `general solution' is to let $u(x,y)$ be a constant plus the (signed) distance of $(x,y)$ to some set (usually a point or a curve) in the plane. The only global smooth solutions are linear functions (as you gave), and the only global solution with only one singular point is the distance from a point (plus constants), as you saw. For the more general case, as long as $f$ is strictly positive, you let $u = F(v)$ where $v$ satisfies the original equation ($f\equiv1$) and $F'(v) = 1/f(F(v))$. – Robert Bryant Dec 12 '11 at 20:01
• Thanks Robert. I guess you meant $F'=f$ not $=1/f$. I would've picked this as my answer if it were not a comment. – Mahdiyar Dec 13 '11 at 10:10

$|\nabla u|^2=f(u(r))$ is a special case of the eikonal equation. You could advise any good book on pdes. Also you will need to sharpen your knowledge on Hamilton-Jacobi methods.
• Yes, I've seen in it classical mechanics, but I didn't recognize it! Nevertheless, even if I did I wouldn't know the general solution Robert talked about. In fact, I was trying to find a canonical transformation to make $2H=A_1(q)p_1^2+A_2(q)p_2^2+2V(q)$ look like $P_1^2+P_2^2+2U(Q)$, that I came up with the original equation. – Mahdiyar Dec 13 '11 at 10:18
The equation $|\nabla u|=f(u)$ can be recast as $|\nabla v|=1$ in terms of $v=g(u)$, if $f>0$.
So let us suppose $f\equiv1$. To determine $u$, you need a boundary condition $a$ on the boundary $\partial\Omega$ of your domain. Remark that a necessary condition is that $|\nabla_Ta|\le1$, where $\nabla_T$ denotes the tangential gradient.
In general, you don't have a classical solution. Think for instance to the problem in a ball with $a\equiv0$; in which case you have only bad choices, as $u\equiv|x|-1$ or $\equiv1-|x|$. Therefore one must search for Lipschitz solutions that satisfy the equation almost everywhere. To recover uniqueness, one must know where does the boundary value problem come from. In general, the model behind it contains a unilateral condition, often called an viscosity condition. This theory was developed by M. Crandall and P.-L. Lions in the 80's. For the equation above, this yields the viscosity solution $$u(x)=\inf_\gamma (a(\gamma(0))+\ell(\gamma)),$$ where $\gamma$ runs over the paths from the boundary $\partial\Omega$ to $x$, and $\ell(\gamma)$ is its length. If $\Omega$ is convex, this is just $$u(x)=\inf_{y\in\partial\Omega}(a(y)+|x-y|).$$