I am try to solve the following differential equation numerically: $$\frac{\partial p}{\partial t}=\frac{\partial^2 p}{\partial x^2}-e^{-t}\frac{\partial p}{\partial x}$$ with boundary conditions $p(x=0,t)=p(x=L,t)=0$ and initial condition $p(x,0)=\delta(x-x_0)$. I am also interested in computing the quantity: $$q(t)=\int_0^L p(x,t)dx$$ which satisfies the equation: $$q(t)=\frac{\partial p}{\partial x}(L,t)-\frac{\partial p}{\partial x}(0,t)$$ with initial condition $q(0)=1$.
I have tried the following in Mathematica:
NDSolve[{D[p[x, t], {t, 1}] == D[p[x, t], {x, 2}] - Exp[-t] D[p[x, t],x],
p[0, t] == 0, p[L, t] == 0,
p[x, 0] == 1/Sqrt[2 Pi sigma^2] Exp[-(x-x0)^2/(2 sigma^2)],
q'[t]==D[p[L, t], x] - D[p[0, t], x],q[0]==1},
{p[x, t],q[t]}, {x, 0, L}, {t, 0, T}]
Note that I have approximated the initial delta-function condition with a Gaussian. When I run this code I get the error:
Function::fpct: Too many parameters in {x,t} to be filled from Function[{x,t},1][t].
Could you help me to understand why? Thank you

x0,L,Tandsigma? – zhk May 15 '17 at 16:32p^{0, 1}[L, t]? – rhermans May 15 '17 at 16:32D[p[x, t], {x, 1}]? – rhermans May 15 '17 at 16:36Derivative[0,1][p][L,t]-Derivative[0,1][p][0,t]. And wouldn'tNDSolveexpect numerical values forLandTin{x, 0, L}, {t, 0, T}– rhermans May 15 '17 at 16:43