How to deal with a Dirac delta function numerically?

335 Views Asked by At

I need to solve some differential equations with a Dirac delta function. e.g. the source terms are like, $\delta(x)$ and $\partial_x \delta(x)$.

Could I just use the Gaussian type function? e.g.

$$ \delta(x-a) = a_1\exp(-\frac{(x-a)^2}{2a_2}),$$ and, $$ \partial_x \delta(x-a) = - \frac{a_1}{a_2}(x+a_1)\exp(-\frac{(x-a)^2}{2a_2}) $$

where by setting e.g. $a_1=1000$, $a_2=0.01$.

If the answer is yes, then how to choose the reasonable values of $a_1$ and $a_2$?

Thanks!