I would like to obtain the solution of the diffusion equation $$ \frac{\partial p(x,t)}{\partial t} = D \frac{\partial^2 p(x,t)}{\partial x^2}$$ for reflecting boundary conditions at $x=-a$ and absorbing ones at $x=b$. These boundary conditions are $$ \frac{\partial p(x,t)}{\partial x}\Bigg|_{x=-a}=0 $$ and $$ p(b,t) =0.$$
Using separation of variables I found $$ p(x,t) = A \sum_{l=1,3,5,\dots} e^{-\lambda_l^2 D t}\Big[\cos(\lambda_l x) + \tan(\lambda_l a)\sin(\lambda_l x)\Big],$$ where $\lambda_l = \pi l/[2(a+b)]$ and $A$ is a coefficient I have not yet been able to determine. Because one boundary is absorbing, the probability distribution is not normalized at all times. It is only normalized when $t=0$. I would like to use this condition to calculate $A$.
Obviously I could set $t=0$ and integrate over $x \in [-a,b]$, but this gives an infinite series I'm unable to sum. I wonder if there is a trick. I know the initial condition is $\delta(x) = p(x,0)$. If I set $$\delta(x) = \frac{1}{2\pi}\sum_{n=-\infty}^\infty e^{i n x} = A \sum_{l=1,3,5,\dots} \Big[\cos(\lambda_l x) + \tan(\lambda_l a)\sin(\lambda_l x)\Big], $$ is there a way to manipulate the RHS to match factors of $e^{inx}$ and thereby solve for $A$?