# Numerical methods for conservation laws, HW 1

#### 1. Modify the upwinding, Lax-Friedrichs, Lax-Wendroﬀ subroutines given in class (or obtained/written by yourself) to solve

$\left\{ \begin{array}{ll} u_{t} + au_{x} = 0 \\ u(x, 0) = u_{0}(x)\\ u(0, t) = u(1, t) \end{array} \right.$

on $$(x, t) \in [0, 1] \times [0, 5]$$

• Your code should take spatial stepsize ∆x, a, $$\lambda = a \Delta t$$, and $$u_0(x)$$ as input.

• The output is a video showing the solution as time t goes from 0 to 5.

Solves Burgers equation using naive upwind scheme. For video run Matlab code attached.