# How to integrate a function multiplied for a sign function?

I am studying QFT and I found this integral on my lecture notes (for the context: we're trying to show that the covariant commutation relations are Lorentz invariant)

$$∫\frac{d^{3}p dp_{0}}{(2\pi)^{3}}\frac{1}{2ω_{p}}(δ(p_{0}-ω_{p})-δ(p_{0}+ω_{p}))e^{-ip\cdot x}$$

with $$ω_{p}=\sqrt{m^{2}+\overrightarrow{p}^{2}}$$. In the notes the latter is said to be equal to this other thing here

$$∫ \frac{d^{4}p}{(2\pi)^{3}}\frac{\epsilon(p_{0})}{2ω_{p}}(δ(p_{0}-ω_{p})+δ(p_{0}+ω_{p}))e^{-ip\cdot x}$$

where he introduced the sign function of $$p_{0}$$ defined as

$$\epsilon(p_{0})=\begin{cases}1\hspace{0.2cm}\text{if} p_{0}>0\\ -1 \text{if} p_{0}<0. \end{cases}$$

My question is probably trivial: how they can be equal? Can someone does the explicit calculation? Cause I tried and failed every time. To me we should split the first in one part with the + (over $$\mathbb{R}^{+}$$) subtracting the term in $$\mathbb{R}^{-}$$, but I keep failing.

Ok I think I solved my problem, you can just split the two integrals and use the Dirac delta to obtain something that goes like $$\epsilon(ω_{p})e^{-iω_{p}x_{0}}+\epsilon(-ω_{p})e^{iω_{p}x_{0}}=e^{-iω_{p}x_{0}}-e^{iω_{p}x_{0}}$$ and rewrite the last one in term of an integral with the Dirac delta function. Is that correct?

Yes, what you said is correct. You can also consider the following since it's much simpler ($$a>0$$):
$$\int dx f(x) [\delta(x-a)-\delta(x+a)] = f(a) - f(-a)$$ $$\int dx f(x)\epsilon(x) [\delta(x-a)+\delta(x+a)] = \epsilon(a)f(a) + \epsilon(-a)f(-a) = f(a) - f(-a)$$
So you can see why the equality holds: $$\epsilon(x)$$ is positive for the first term and negative for the second.