Solutions of Hamilton-Jacobi equation Let $u\in \mathcal{C}^{\infty}(\mathbb{R}^2, \mathbb{R})$ to the Haminton-Jacobi equation
$$(\partial_{x_1}u)^2+ (\partial_{x_2}u)^2=1$$
Could you please help me to show that the only real-valued solutions of the above equation are of the form
$$u(x)=x\cdot w_0+t_0\quad\quad \text{for}\quad w_0\in \mathbb{R}^2,\quad \|w_0\|=1,\quad t_0\in \mathbb{R}$$
I managed to prove that if a function u satifies $$u(x)=x\cdot w_0+t_0\quad\quad \text{for}\quad w_0\in \mathbb{R}^2,\quad \|w_0\|=1,\quad t_0\in \mathbb{R}$$
then it is a solution but I don't know how to deal with the other direction.
Thanks in advance for your help.
 A: You can do this via the method of characteristics: let $\mathbf x(s) = (x_1(s),x_2(s))$, $z(s) = u(\mathbf x(s))$, and $\mathbf p(s) = \nabla u(\mathbf x (s))$. Given a function $F : \mathbb R^n \times \mathbb R \times \mathbb R^n$ defined by $(p,z,x) \mapsto F(p,z,x)$, the characteristic equations for the fully nonlinear equation $$F (\nabla u , u , x) =0 \qquad \text{in } \mathbb R^2 $$ are \begin{align*}
\mathbf p'(s) &= -\nabla_x F(\mathbf p(s),z(s),\mathbf x (s)) - \partial_z FF(\mathbf p(s),z(s),\mathbf x (s)) \mathbf p(s) \\
z'(s) &= \nabla_p F(\mathbf p(s),z(s),\mathbf x (s))\cdot \mathbf p(s) \\
\mathbf x'(s) &= \nabla_p F(\mathbf p(s),z(s),\mathbf x (s)) 
\end{align*} as well as the original equation $$F(\mathbf p(s),z(s),\mathbf x (s)) = 0. $$
In this case, $F(p,z,x) = \vert p \vert^2-1$, so $\nabla_x F = 0$, $\partial_zF=0$, and $\nabla_pF = 2 p$. Thus, \begin{align*}
\mathbf p'(s) &= 0 \\
z'(s) &= 2 \vert \mathbf p(s) \vert^2 \\
\mathbf x'(s) &= 2\mathbf p(s)\\
\vert p(s) \vert^2&=1.
\end{align*} From the first equation $p(s) = w_0 \in \mathbb R^n$. Moreover, from the fourth equation $w_0 \in \partial B_1$. Thus, $z'(s) = 2\vert w_0\vert^2=2$, so $z(s) = 2s+a$ for some $a\in \mathbb R$. We also have that $\mathbf x'(s) = 2w_0$, so $\mathbf x(s) = 2w_0s +b$ for some $b\in \mathbb R^n$. In particular, it follows that $w_0\cdot \mathbf x(s)=2 \vert w_0\vert^2s +b\cdot w_0= 2 s +b\cdot w_0$, so $$ s =\frac12 (w_0\cdot \mathbf x(s)-b \cdot w_0).$$ Finally, we have that $$u(\mathbf x(s))=z(s) =2s+a=w_0\cdot \mathbf x (s) +(a-b \cdot w_0),  $$ which implies that the general solution is $$u(x,y) =w_0\cdot (x,y) +t_0  $$ for some $t_0\in \mathbb R$.
A: You were not that far from the solution. Since $(u_{x_1})^2+(u_{x_2})^2=1$, the partial derivatives of $u$ lie on the unit circle (of an abstract space), such that
$$
\begin{cases}
   u_{x_1} = \cos\theta \\
   u_{x_2} = \sin\theta
\end{cases}
$$
where $\theta$ is an arbitrary parameter. In consequence, we have :
$$
\begin{cases}
   u = x_1\cos\theta + A(x_2) \\
   u = x_2\sin\theta + B(x_1)
\end{cases}
$$
hence finally
$$
u(x_1,x_2) = x_1\cos\theta + x_2\sin\theta + C
$$
where $\theta$ and $C$ are the constants of integration. Note that $\vec{w_0} = (\cos\theta,\sin\theta)$.
