There is a famous integral representation of the Kronecker delta: $$ \delta_{N,M} = \int_0^1 dx\ e^{-2 \pi i (N-M)x} $$
Noting this, I have encountered two integrals where $N,M,m \in \mathbb{Z}$. First: $$ \mathcal{I}_{1} = \int_{m-\tfrac{1}{2}}^{m+\tfrac{1}{2}} dx\ x \ e^{-2 \pi i (N-M)x} $$ I have a reference which seems to be implying that $\mathcal{I}_1 = m \delta_{M,N}$.
The second integral is worse (for any $y > 0$): $$ \mathcal{I}_{2} = \int_{m-\tfrac{1}{2}}^{m+\tfrac{1}{2}} dx\ \sqrt{ x^2 + y^2 } \ e^{-2 \pi i (N-M)x} $$ I have no clue how to evaluate either of these. Do they both involve a $\delta_{N,M}$?