How can I solve $u_{xt} + uu_{xx} + \frac{1}{2}u_x^2 = 0$ with the method of characteristics. I am trying to solve the following PDE: $u_{xt} + uu_{xx} = -\frac{1}{2}u_x^2$, with initial condition: $u(x,0) = u_0(x) \in C^{\infty}$ using the method of characteristics.
I am a beginner with the method of characteristics and PDE in general. Here is what I have so far.
Define $\gamma(x,t)$ as the characteristic curves.
$\frac{\partial}{\partial t} u_x(\gamma(x,t),t) = u_{xt} + u_{xx}\gamma_t(x,t) = - \frac{1}{2}u_x^2$
Set $u_t = u_x$
$\Rightarrow \frac{\partial}{\partial t} u_x(\gamma(x,t),t)= (u_t)_x + u_{xx}\gamma_t(x,t)$
$ = u_{xx} + u_{xx}\gamma_t = - \frac{1}{2}u_x^2$
From this I get $\gamma_t = -\frac{1}{2}\frac{u_x^2}{u_{xx}} - 1$
However, I am not sure this is the right approach and do not fully understand how to use the method of characteristics when the solution $u(x,t)$ is constant on the characteristic curves.
Any help is much appreciated.
Edit: I made some progress by using $v=u_x$ and getting $\frac{dv}{dt} = \frac{-1}{2} v^2$ and $\frac{\partial x}{\partial{t}} = 1$. Then separating the first ODE, I get $\frac{2}{v} = t + c$. However, I am not sure if my solution after integrating with respect to $x$ and using the initial condition is correct. I end up with $u(x,t) = \frac{2}{t+c}x + c_1$, $u(x,0) = \frac{2}{c}x + c_1$.

Not so sure:
$u_{xt} + uu_{xx} + \frac{1}{2}u_x^2 = 0$
$2u_{xt} + 2uu_{xx} + u_x^2 = 0$
Let's define
$u = x t$
Then:
$u_{x} = x_{x} t$
$u_{t} = x t_{t}$
$u_{xt} = x_{x} t_{t}$
$u_{xx} = x_{xx} t$
Now:
$2 u_{xt} + 2u u_{xx} + u_x^2 = 0$
$2 x_{x} t_{t} + 2 x t x_{xx} t + x_{x}^2 t^2 = 0$
We divide by $x_{x} t^2$:
$2 t_{t} / t^2 + 2 x x_{xx} / x_{x} + x_{x}  = 0$
Please, verify.
