Solve Burgers' equation

Solve Burgers’ equation $$u_t + uu_x =0,$$
with $u=u(x,t)$ and the side condition $u(x,0)=x$.

I am not sure on how to find the solution $u(x,t)$. I have learned the method of characteristics. I am neither sure on how to use the side condition in Burgers’ equation.

Solutions Collecting From Web of "Solve Burgers' equation"

This PDE is called the (inviscid) Burgers’ equation. The characteristic equations are the system of ODEs $${dx\over dt}=u, \quad {du\over dt}=0,$$ which has solution $$u=C_1, \quad x=ut+C_2,$$ where $C_1,C_2$ are constants. But $C_1$ is a function of $C_2$, so $$u=C_1\implies u=C_1(C_2)=C_1(x-ut).$$ To determine, $C_1$ note that the side condition requires $$u(x,0)=C_1(x-u(x,0)\cdot 0)=x\implies C_1(x)=x.$$ Thus, $u=x-ut$ and we conclude $$u(x,t)={x\over 1+t}.$$