Question: Plotting characteristics

I am currently learning about nonlinear waves and and am having problems with my maple coding where I am plotting the characteristics of the initial value problem

$u_[t] + uu_[x] = 0$ where $u(x,t) = a$ if $x < -1$

                                               = $b$ if $ -1 < x < 1$

                                               = $c$ if $ x > 1$

where $a$, $b$ and $c$ are unequal constants. Also, there are 6 cases to this, $a > b > c$, $a > c > b$, $b > a >c$, $b > c > a$, $c > a > b$ and $c > b > a$. In each case I need to plot the characteristics (and where possible plot the rarefaction waves, but this bit is not necessary right now). My problem is that I am highly certain that my code is incorrect as I am unsure where/how to implement the fact that $a$, $b$ and $c$ vary since there are different cases. My current code is down below

 

 

restart: with(plots): with(plottools): with(PDEtools):
ploti:= implicitplot({seq(t*((k/2))+k/2-x,k=-10..-1)},x=-10..10,t=0..10,view=[-5..5,0..5],color=blue,thickness=2):
ploti2:= implicitplot({seq(t*(k/2)+k/2-x,k=-1..1)},x=-10..10,t=0..10,view=[-5..5,0..5],color=red,thickness=2):
ploti3:= implicitplot({seq(t*((k/2))+k/2-x,k=1..10)},x=-10..10,t=0..10,view=[-5..5,0..5],color=yellow,thickness=2):
display(ploti,ploti2,ploti3);

Any help would be much appreciated

 

Please Wait...