Dear all,

I am trying to solve the following partial differential equation (transport or advection equation) with given initial and boundary conditions:

restart: with(PDEtools):

sys := [v*diff(u(x,t), x) + diff(u(x,t), t) = 0, u(x,0) = exp(-x), u(0,t) = sin(t)];

pdsolve(sys);

But it does not work. The solution is (or should be):

u(x, t) = exp(t*v-x)+Heaviside(t-x/v)*(sin(t-x/v)-exp(t*v-x))

I think the reason is that the interval for t (in [0, inf)) and x (in [0, 1]) is not specified. On the other hand, this works:

restart: with(PDEtools):

sys := [diff(u(x, t), t) = diff(u(x, t), x, x), u(0, t) = 0, u(1, t) = 0, u(x,0) = f(x)];

sol := pdsolve(sys);

How can I solve a PDE like the transport equation with given initial AND boundary conditions?

Thanks a lot