So I’m doing QM and found bunch of problems for beginners and I’m struggling with this one: $\lim_{a\rightarrow 0}\int^{\infty}_{-\infty}e^{\frac{ip x}{\hbar}-a x^2}dx=2\pi\hbar\delta(p).$$$\lim_{a\rightarrow 0}\int^{\infty}_{-\infty}e^{\frac{ip x}{\hbar}-a x^2}dx=2\pi\hbar\delta(p).$$ If I swap the limit and the integral I get the correct answer, but can I do that?