Stuck with derivation of correlation functions in QFT The Green's function for Feynman propagator satisfy:
$$\Box_{x}D_{x1}=-i\delta_{x1}$$
where $$\Box_{x}=\partial_{t}^{2}-\partial_{x}^{2}$$
then:
$$\langle \phi_{1}\phi_{2}\rangle=\int d^{4}x \delta_{x1}\langle \phi_{x}\phi_{2}\rangle =i\int d^{4}x(\Box_{x}D_{x1})\langle\phi_{x}\phi_{2}\rangle.$$
the derivation I am stuck is on this following step:
$$i\int d^{4}x D_{x1}\Box_{x}\langle \phi_{x}\phi_{2}\rangle.$$
I am puzzled as it claim integration by parts shall yield the result but
$$\partial_{x}AB=A\partial_{x}B+B\partial_{x}A$$
and
$$\partial_{x}^{2}(AB)=(\partial_{x}^{2}A)B+(\partial_{x}^{2}B)A+2(\partial_{x}A)(\partial_{x}B)$$
so the final equation I couldn't obtained from these equations should yield negative sign
 A: You have to do integration by parts twice. Namely, I write condensed $\Box_{(x)}=\partial_{(x)}\cdot\partial_{(x)}$, where $\partial_{(x)}:=(\partial_t,\partial_x)$ and $\cdot$ is the Minkowski inner product, $a\cdot b:=\eta_{\mu\nu}a^\mu b^\nu$. Check that this gives indeed $\Box_{(x)} = \partial_t^2 - \partial_x^2$, in the signature that you use. Then
$$ \begin{aligned}&\phantom{==}\int \mathrm{d}^d{x}\  \big(\Box_{(x)}D(x-x_1)\big)\big<\phi(x)\phi(x_2)\big>=\\ &=\int \mathrm{d}^d{x}\  \big(\partial_{(x)}\cdot\partial_{(x)}\,D(x-x_1)\big)\big<\phi(x)\phi(x_2)\big> = \\ &= \text{bdy}-\int \mathrm{d}^d{x}\  \big(\partial_{(x)}\,D(x-x_1)\big)\cdot\partial_{(x)}\big<\phi(x)\phi(x_2)\big> = \\ &= \text{bdy} -\Bigg[\widetilde{\text{bdy}}-\int \mathrm{d}^d{x}\  D(x-x_1)\ \partial_{(x)}\cdot\partial_{(x)}\big<\phi(x)\phi(x_2)\big> \Bigg] = \\ 
&= \text{bdy} -\widetilde{\text{bdy}}\ + \int \mathrm{d}^d{x}\  D(x-x_1)\ \Box_{(x)}\big<\phi(x)\phi(x_2)\big>,\end{aligned}$$
where $\text{bdy}$ and $\widetilde{\text{bdy}}$ are the boundary terms you get after each integration by parts. If they vanish in your case, as implied in your question, you have the desired result.
A: The identity you have derived,
$$
\partial_{x}^{2}(AB)=(\partial_{x}^{2}A)B+(\partial_{x}^{2}B)A+2(\partial_{x}A)(\partial_{x}B),
$$
is true but it doesn't help you integrate by parts.  Specifically, if you were to integrate both sides, you would get (up to boundary terms)
$$
0 \sim  \int (\partial_{x}^{2}A)B \, d^4 x+\int (\partial_{x}^{2}B)A\, d^4 x +2 \int (\partial_{x}A)(\partial_{x}B) \, d^4x
$$
which doesn't help you relate the first two integrals because the third integral doesn't vanish (the integrand is not a total derivative.)
Instead, the identity you need is
$$
\partial_x \left[ (\partial_x A) B - A (\partial_x B) \right] =
(\partial^2_x A) B - A(\partial^2_x B).$$
If you apply the above argument to this identity, you will obtain the result you seek.
