wave equation
the main diiferences in plots ,i came up with, in n=160 where oscillations are present and growing with time due to gibbs phenomena.
plots for n=20,40,80 gives the rough figure for step function as it also fails as time increases.
plot for n=80 is somewhat giving the right behaviour for the time step function