Two-point correlation function of a scalar field $\langle 0 | \phi(x) \phi(0)| 0 \rangle$ I'm trying to find the two point correlation function for a massless scalar field obeying $\square \phi = 0$. I can write
$$\langle 0 | \phi(x) \phi(0)| 0 \rangle = \int \frac{d^dk}{(2\pi)^d} \delta(k^2)\theta(k_0)\langle 0| \phi(x) | k\rangle \langle k | \phi(0)|0\rangle= \int \frac{d^dk}{(2\pi)^d} e^{ikx}\delta(k^2)\theta(k_0)$$
where I've inserted the identity operator for 1-particle momentum eigenstates. But elsewhere I see the expression 
$$\langle 0| \phi(x) \phi(0)|0 \rangle = \int \frac{d^dk}{(2\pi)^d} \frac{e^{ikx}}{k^2}$$
for instance, the first line of this page. Are these forms equivalent? Which is correct and why?
 A: First, the second expression is for the time-ordered correlation function. The first is for the Wightman function, without time-ordering.
After correcting this, to see that the two approaches give the same result, perform the integral with respect to $k^0$. 
For the first case you can use the delta function relation $\delta(f(x)) = \sum_i \frac{\delta(x - x_i)}{\vert f'(x_i)\vert}$, where $x_i$ are the zeros of $f(x)$.
For the second case you can use a contour integral and the residue theorem. You'll need to use the Feynman $i\epsilon$ prescription (see https://en.wikipedia.org/wiki/Propagator#Feynman_propagator).
BTW, the identity operator used in your question is not the full identity operator (from the way you phrased it, you probably already know this, but just in case). It only covers the single particle states, while the full Hilbert space contains multi-particle states (including 0-particles). In a non-interacting theory the field operator's matrix elements between the vacuum state and multi/zero-particle states are zero.
A: I don't understand the very first formula and you discussion of identity insertion. I would like you to start from the mode decomposition of scalar field:
$$\phi(x)=\int_{p}\frac{1}{\sqrt{2\omega_p}}\left(a_pe^{-ipx}+a^{\dagger}_pe^{ipx}\right)$$
and similar decomposition of $\phi(0)$ (keep in mind that the momenta should be another, fo r instance $k$). Then, you can see that from four terms only one gives contribution into the average and this term can be rewritten with help of $[a_p,\,a^{\dagger}_k]=(2\pi)^d\delta^{(d)}(p-k)$. Finally, you will obtain the desired result (only one integral survive after integration with delta-function). I hope this help.
