AIM: EFFECT OF TIMESTEP ON CONVECTION EQUATION.
Objective: 1D linear convection equation is given below. `(du/dt)+c(du/dx)=0` n=80 dt=[1e-4 1e-3 1e-2 1e-1] Here, for discretization, we are using first-order backward differencing for space term and forward differencing for time term. let's write code time for the timestep function as an argument and solve the problem. For the function…