Derivation of the Klein-Gordon Propagator I'm learning some quantum field theory. I'm currently using the book An Introduction to Quantum Field Theory by Peskin and Schroeder. I have a problem that I can't figure out at the moment. It is related to the derivation of the Klein-Gordon propagator.
It goes like this
Assuming $x^0>y^0$
Step 1
$$
\langle 0|[\phi(x),\phi(y)]|0 \rangle=\int \frac{d^3p}{(2\pi)^3}\frac{1}{2E_\textbf{p}}(e^{-ip\cdot(x-y)}-e^{ip\cdot(x-y)}).\tag{2.54}
$$
The $p^0$ is equal to $=E_\textbf{p}$ in both exponents. Since we’re integrating over all $\textbf{p}$ we can change the integration variable from $\textbf{p}$ to $-\textbf{p}$ in the second term and thus obtain
Step 2
$$
\begin{equation} 
\langle0|[\phi(x),\phi(y)]|0 \rangle = \int \frac{d^3p}{(2\pi)^3}\Big(\frac{1}{2E_\textbf{p}}e^{-ip\cdot(x-y)}\Big |_{p^0=E_\textbf{p}}+\frac{1}{-2E_\textbf{p}}e^{-ip\cdot(x-y)}\Big |_{p^0=-E_\textbf{p}}\Big)
\end{equation}
$$
So if $x^0>y^0$
Step 3
$$
\begin{equation} 
\label{eq:1}
\langle 0|[\phi(x),\phi(y)]|0 \rangle = ∫\frac{d^3p}{(2π)^3}∫\frac{dp^0}{2πi}\frac{−1}{p^2−m^2}e^{−ip⋅(x−y)}
\end{equation}
$$
Question:
I don't understand what happens between Step 2 and Step 3. I need some clarification. Why is an integrand over $p^0$ suddenly appearing Where did we get the $2\pi i$ from and why do we only have one term now instead a sum of two?
 A: There's some confusion here.
First, Klein-Gordon propagator is defined as
$$ \left<0\right| \text{T} \phi(x) \phi(y) \left|0\right> $$
where $\text{T}$ is the chronological ordering symbol. The commutator does not enter this definition. Thus the two terms shouldn't appear there.
Second, the appearance of the $dp^0$ integral is a mathematical trick. You can check that it indeed works by deforming the contour in the complex plane such that it doesn't pass through poles and take the sum of residues in the poles:
$$ \int_\Gamma dz f(z) = 2 \pi i \cdot \sum_{i} \text{Res}[f, z_i]. $$
In our case there's only one pole though. The exact choice of the pole is determined by the $i \varepsilon$ prescription (i.e. this explains why we are interested in the Feynman propagator in QFT).
A: I think it's easiest to work it out backwards, start with step 3 and show it equals step 2. Before I do that though I want to comment on the appearance of the $p^0$ integral. The integral over $d^3p$ is a little misleading, as the integral is not performed over all of momentum, but is instead restricted to "on-shell" momentum (the positive invariant mass shell hyperboloid in 4-momentum space). This integral would look like,
\begin{equation}
 \int \frac{d^3\textbf{p}}{(2\pi)^3} \frac{dp^0}{2\pi} (2\pi) \delta^{(4)}\big((p^0)^2 - |\textbf{p}|^2 - m^2\big)f(p)\bigg|_{p^0 > 0} = \int \frac{d^3\textbf{p}}{(2\pi)^3}\frac{1}{2(p^0)^2}f(p)\bigg|_{p^0 = |\textbf{p}|^2 + m^2}
\end{equation}
This is given in Peskin & Schroeder eq. 2.40, and uses eq. 2.34 for evaluating the delta function. So there is an inherent integral/restriction in momentum space. I suspect you could use this to massage step 2 to step 3, but I found it easier to start with step 3 and get to step 2.
Now taking equation 3, split the denominator into 2 parts and the poles become clear,
\begin{equation}
\int\frac{d^3\textbf{p}}{(2\pi)^3}e^{i\textbf{p}\cdot(\textbf{x}-\textbf{y})}\int \frac{dp^0}{2\pi i}\frac{-1}{\big(p^0 + \sqrt{|\textbf{p}|^2 +m^2}\big)\big(p^0 - \sqrt{|\textbf{p}|^2 +m^2}\big)}e^{-ip^0(x^0-y^0)}
\end{equation}
Now if we hold $\textbf{p}$ fixed and consider the integral over $p^0$ we have 2 poles, one at $p^0 = \sqrt{|\textbf{p}|^2 +m^2}=E_\textbf{p}$, and the other at $p^0 = -\sqrt{|\textbf{p}|^2 +m^2}=-E_\textbf{p}$. If $x^0 > y^0$ then the exponential argument $e^{-ip^0(x^0-y^0)}$ goes to zero for $\text{Im}(p_0) < 0$, so we close our contour below and include both poles in our contour (we pick up a minus sign from the direction of our contour integration).
Using the residue theorem, $\oint f(z) = 2\pi i \sum \text{Res}(f(z))$ we can do the $p_0$ integral,
\begin{align}
\int \frac{dp^0}{2\pi i}\frac{-1}{\big(p^0 + E_\textbf{p}\big)\big(p^0 - E_\textbf{p}\big)}e^{-ip^0(x^0-y^0)}&= \frac{1}{2\pi i} 2\pi i\bigg(\frac{1}{2E_\textbf{p}}e^{-iE_\textbf{p}(x^0-y^0)}+\frac{1}{-2E_\textbf{p}}e^{iE_\textbf{p}(x^0-y^0)}\bigg)
\end{align}
Combining this with the momentum integral and exponential,
\begin{align}
\int d^3\textbf{p}&e^{i\textbf{p}\cdot(\textbf{x}-\textbf{y})}
\bigg(\frac{1}{2E_\textbf{p}}e^{-iE_\textbf{p}(x^0-y^0)}-\frac{1}{2E_\textbf{p}}e^{iE_\textbf{p}(x^0-y^0)} \bigg)\\
&=\int \frac{d^3\textbf{p}}{(2\pi)^3}\bigg(\frac{1}{2E_\textbf{p}}e^{-iE_\textbf{p}(x^0-y^0)}e^{i\textbf{p}\cdot(\textbf{x}-\textbf{y})}-\frac{1}{2E_\textbf{p}}e^{iE_\textbf{p}(x^0-y^0)}e^{i\textbf{p}\cdot(\textbf{x}-\textbf{y})} \bigg)\\
&=\int \frac{d^3\textbf{p}}{(2\pi)^3}
\bigg(\frac{1}{2E_\textbf{p}}e^{-ip^0(x^0-y^0)+i\textbf{p}\cdot(\textbf{x}-\textbf{y})}\bigg|_{p^0=+E_\textbf{p}}-\frac{1}{2E_\textbf{p}}e^{-ip^0(x^0-y^0)+i\textbf{p}\cdot(\textbf{x}-\textbf{y})}\bigg|_{p^0=-E_{\textbf{p}}} \bigg)\\
\end{align}
And this is equivalent to step 2. However if $x^0 < y^0$ then you must close the contour in the positive hemisphere, now it contains no poles and is equal to zero. I think this is what they are trying to show before introducing the more common Feynman Propagator. This point is made here Klein-Gordon propagator integral
