Solve the initial value problem $$u_t+3uu_x=0 ,\quad u(0,x)=\left\{\begin{matrix} 2 & x<1\\ 0& x>1 \end{matrix}\right.$$
My Idea:
given that $u_t+3uu_x=0$
Now $\frac{dt}{1}=\frac{dx}{3u}=\frac{du}{0}$
$\frac{dt}{1}=\frac{du}{0} \rightarrow u=c_1$
$\frac{dt}{1}=\frac{dx}{u} \Rightarrow \frac{dt}{1}=\frac{dx}{3c_1} \Rightarrow 3c_1t-x=c_2$
any one can help me from here
Let us assume that you want to solve $u_t + 3uu_x = 0$, with the proposed initial data $$ u(x,0) = \left\lbrace \begin{aligned} &2 &&\text{if}\quad x < 1 \, ,\\ &0 &&\text{if}\quad x > 1 \, .\\ \end{aligned} \right. $$ We follow the steps in this post. According to the Lax entropy condition, the solution to this Riemann problem is a shock wave (characteristic curves intersect in the $x$-$t$ plane), which speed $s$ is given by the Rankine-Hugoniot condition $$ s = \frac{3}{2}\left(0 + 2\right) = 3 \, . $$ One obtains the following solution: $$ u(x,t) = \left\lbrace \begin{aligned} &2 &&\text{if}\quad x < 1+st \, ,\\ &0 &&\text{if}\quad x > 1+st \, .\\ \end{aligned} \right. $$