I know the Dirac identity $$ \int_{-\infty}^{\infty}\delta(f(x))g(x)dx = \sum_{i}\frac{g(x_{i})}{|f'(x_{i})|}$$ where the $x_{i}$'s are the zeros of $f$ for which $f'(x_{i})\neq 0$. My question is: what if the integral is $\int_{a}^{b}$ instead of $\int_{-\infty}^{\infty}$ ? Do we take only the zeros of $f$ that are on $[a,b]$ ?
Thank you in advance for your answers