# Use of method of characteristics to solve the given PDE

How to use the method of characteristics to solve the nonlinear problem:

$$u_x^2 - u_y^2 = x^2 - y, ~~ u(x,0)=x.$$

While studying for the finals I came up with this question. I honestly don't know how to solve this. Any help is much appreciated.

Hint: Observe \begin{align} u_x^2-u_y^2 = (u_x-u_y)(u_x+u_y) = x^2-y. \end{align} then \begin{align} F(u_x, u_y, u, x, y)=u_x^2-u_y^2 - x^2+y \equiv 0. \end{align} Since $F(p_1, p_2, z, x, y) = p_1^2-p_2^2-x^2+y$ then the characteristics equations yields the following system of ODE \begin{align} \begin{cases} \dot p_1 =2x, \dot p_2 =-1\\ \dot z = 2(p_1^2-p_2^2)\\ \dot x= 2p_1, \dot y = -2p_2 \end{cases}. \end{align} Using the first two and last two characteristic equations yield \begin{align} \ddot x-4x = 0 \ \ \text{ and } \ \ \ddot y= 2 \end{align} which means \begin{align} x(t) = x_0\cosh 2t + p_1^0 \sinh 2t, \ \ \ y(t) = t^2-2p_2^0 t+y_0 \end{align} and \begin{align} p_1(t) = \frac{\dot x(t)}{2} = x_0\sinh 2t+p_1^0\cosh 2t, \ \ \ p_2(t) = \frac{-\dot y(t)}{2} = p_2^0-t. \end{align} Hence \begin{align} \dot z(t) = 2(x_0\sinh 2t+p_1^0\cosh 2t)^2-2(p_2^0-t)^2 \end{align} which means \begin{align} z(t) = z_0+\int^t_0 2(x_0\sinh 2s+p_1^0\cosh 2s)^2-2(p_2^0-s)^2\ ds. \end{align}
To simplify matter, since $u(x, 0) = x$ then it follows $u_x(x_0, 0) = 1 = p_1^0$. Since $u_x(x_0, 0)^2-u_y(x_0, 0)^2-x_0^2 =0$, then it follows $\pm \sqrt{1-x_0^2}= p_2^0$ (we will not choose yet).