Numerical integration with a Dirac delta function in integrand

521 Views Asked by At

I have an equation that involves a numerical integral using a successive application of the trapezoidal rule between points in the original code. I am trying to solve a problem which has a Dirac delta function in the integrand, instead of the usual factors for which the code was initially written. Ideally (theoretically), the effect of a Dirac delta function is that the integral is equal to the value of the integrands (apart from Dirac delta) at the point where the Dirac delta is located. But, having a Dirac delta with a finite resolution of the numerical method means that the Dirac delta has a finite width (which is a triangle between one step before the location and one step afterward). So, in the trapezoidal method, should I take into account the width of the Dirac delta? The simple math of the trapezoidal rule would suggest so, but I am not 100% convinced.