Exact solution of the transport equation, Neumann boundary

164 Views Asked by At

Please, can anyone give me some examples of the exact solution of the following Pde with the corresponding functions f and g. I need these to know if my code of an approximation scheme is correct or not.

$$\left\{\begin{array}{ll} \partial_{t} u+ \partial_{x} u=f(x,t), & t \in(0, 1), x \in(-1, 1) \\ u(0, x)=g(x), & x \in(-1, 1) \\ \frac{\partial u}{\partial n}=0, & x=1,x=-1,t \in(0, 1) \end{array}\right.$$

For $f=0$, the exact solution will be $u(x,t)=g(x−t)$, my problem is that I can't see why this solution should necessarily verify the Neumann boundary conditions.