# PDEMOC12

$u_{t}+uu_{x}=0,u(x,0)={\begin{cases}1,&x\leq 0\\1-x,&01\end{cases}}\,$

Define $G(u)={\frac {1}{2}}u^{2}\,$ so $u_{t}+[G(u)]_{x}=0\,$.

The characteristic line is $x=ut+x_{0}\,$ (See PDEMOC14).

But in the middle region $u=u(x_{0},0)=1-x_{0}\,$ because the characteristics determine that $u\,$ is constant with respect to $t\,$.

Now $u=1-x_{0}\,$ and $x=ut+x_{0}\,$ imply $u={\frac {x-1}{t-1}}\,$

Now we have the solution $u(x,t)={\begin{cases}1,&x\leq 0\\{\frac {x-1}{t-1}},&01\end{cases}}\,$

The shock is at $(1,1)\,$.

Here $u_{r}\,$ refers to the right limit for $x\,$ which is 0 and $u_{l}\,$ is the left limit which is 1. The shock line will determine where these regions meet and the constant solutions on either side of this line is the weak solution.

Find the shock condition

$\xi '(t)={\frac {G(u_{r})-G(u_{l})}{u_{r}-u_{l}}}={\frac {{\frac {-1}{2}}}{-1}}={\frac {1}{2}}\,$.

$\xi (t)={\frac {1}{2}}t+c_{1}\,$

Plug in the shock point found earlier and let $x=\xi \,$.

$1={\frac {1}{2}}+c_{1}\implies c_{1}={\frac {1}{2}}\,$

So now $\xi (t)={\frac {1}{2}}t+{\frac {1}{2}}\,$.

The weak solution is $u(x,t)={\begin{cases}1,&x\leq \xi (t)\\0,&x>\xi (t)\end{cases}}\,$.