I have a question related to a typical integration in particle physics. Suppose one has a function $f(t) = \dfrac{i}{t^2-\omega^2 }$ with $t, \omega \in \mathbb{R}$ and $\omega>0$. I am interested in computing
$\left(\dfrac{\partial^2}{\partial x^2}+\omega^2\right) \mathcal{I}$, where $\mathcal{I} = \int_{-\infty}^\infty dt f(t) e^{-i t x}$ .
I'm sure the correct way to do this is:
$\left(\dfrac{\partial^2}{\partial x^2}+\omega^2\right) \mathcal{I} = \int_{-\infty}^\infty (-t^2+\omega^2) f(t) e^{-i t x} = \int_{-\infty}^\infty (-i) e^{-i t x} = -i \delta(x)$
The question is: there is another potential way of doing this, performing the integration over $t$ first and the derivative after, as shown below. This other method gives $0$ and intuitively I understand it is wrong, but I'm not sure which step of the calculation exactly goes wrong. Can anyone spot it?
The usual (physics) way to integrate over $t$ first is the following:
one usually promotes $t\to z \in \mathbb{C}$ and changes $f(t)\to f(z)= \dfrac{i}{z^2-\omega^2 + i\epsilon }$ with $\epsilon > 0$, such that the poles are now moved out of the real axis to $z_i = \pm (\omega + i \epsilon)$.
In this way, one can use Cauchy's theorem to see that the integral over the real axis is equivalent to integrating over a closed contour that joins the two ends at infinity.
For $x>0$ the integration contour is closed clockwise in the $\Im z < 0$ half-plane, so I only the residue for $z=\omega - i\epsilon$ is relevant, while for $x<0$ it is closed counter-clockwise in the $\Im z> 0$ plane and only the residue for $z=-\omega + i\epsilon$ is relevant. In the end the result of the integration is $\dfrac{\pi}{\omega} e^{-i \omega |x|}$ and $\epsilon$ can be sent to 0.
But then $\left(\dfrac{\partial^2}{\partial x^2}+\omega^2\right)\left(\dfrac{\pi}{\omega} e^{-i \omega |x|}\right) = \dfrac{\pi}{\omega}(- \omega^2 + \omega^2) e^{i\omega|x|} = 0$.
Of course it is impossible to recover a distribution in $x$ once $t$ is integrated over. But where does the problem arise? Does the derivative somehow "retroactively" invalidate the residues theorem?
Thanks!