# Momentum-dependent correlator in free scalar field theory

In Klein-Gordon theory we have common representation of n-point correlation function as path integral:

$$\langle 0|T[(\hat{\phi}\left(x_{1}\right) \hat{\phi}\left(x_{2}\right))\dots\hat{\phi}\left(x_{n}\right)]|0\rangle=\dfrac{\int \mathcal{D} \Phi(x) e^{i S[\Phi]} \Phi\left(x_{1}\right) \Phi\left(x_{2}\right)\dots\Phi(x_n)}{\int \mathcal{D} \Phi(x) e^{i S [ \Phi]}}$$

Here we use "coordinate" representation of path inegral. The question: is it legal to generalize the identity as follows:

$$\langle 0|T[(\hat{\phi}\left(x_{1}\right) \hat{\phi}\left(x_{2}\right))\dots\hat{\phi}\left(x_{n}\right)\hat{\pi}(x_{n+1})\dots\hat{\pi}(x_k)]|0\rangle=\dfrac{\int \mathcal{D} \Phi(x) \mathcal{D} \Pi(x) e^{i S[\Phi,\Pi]} \Phi\left(x_{1}\right) \Phi\left(x_{2}\right)\dots\Phi(x_n)\Pi(x_{n+1})\dots\Pi(x_k)}{\int \mathcal{D} \Phi(x)\mathcal{D} \Pi(x) e^{i S[\Phi,\Pi]}}$$

Here $$\Pi(x)$$ is canonically conjugate momentum of field $$\Phi(x)$$, $$T$$ is for $$T$$-ordering, and $$x_i$$ are 4-vectors. I am also interested in holomorphic representation:

$$\langle0|T[\hat{a}(p_1,t_1)\dots\hat{a}(p_n,t_n)\hat{a}^{\dagger}(p_{n+1},t_{n+1})\dots\hat{a}^{\dagger}(p_{k},t_k)]|0\rangle = \dfrac{\int \mathcal{D} \alpha^* \mathcal{D} \alpha \, e^{i S[\alpha^*,\alpha]} \alpha(p_1,t_1)\dots\alpha(p_n,t_n)\alpha^{*}(p_{n+1},t_{n+1})\dots\alpha^{*}(p_{k},t_k)}{\int \mathcal{D} \alpha^* \mathcal{D} \alpha \, e^{i S[\alpha^*,\alpha]}}$$

The thing I am confused by is the same for both of this examples. The operators $$\hat{\phi}(x_i)$$ and $$\hat{\pi}(x_j)$$ do not commute, as well as $$\hat{a}(p_i)$$ and $$\hat{a}^{\dagger}(p_j)$$. And I do not really understand, if it matters for correlation function somehow.

Your first equation uses the Lagrangian form of the path integral, where the action $$S[\phi]$$ is computed from the Lagrangian, involving only the field $$\phi$$ and its derivatives. For the second equation, you would need the Hamiltonian form, involving the field $$\phi$$ and conjugate momentum $$\pi$$. Note that in the right hand side for the path integral, $$\phi$$ and $$\pi$$ are just integration variables. They are not related by the equation of motion (like their quantum operator counterparts). The prescription for the Halmitonian form is that one need to integrate over all the momenta first. For a free scalar field theory, one can switch freely between the Lagrangian and Hamiltonian forms but it is not so in general. So keep that in mind.
To compute correlators involving momenta for a free scalar field theory, you can use either form. Using the Lagrangian form, noticing that $${\pi}(x)={\dot{\phi}}$$: \begin{align} \langle0|T\big[\hat{\phi}_1\hat{\phi}_2...\hat{\phi}_n\hat{\pi}_{n+1}\big]|0\rangle & =\langle0|T\big[\hat{\phi}_1\hat{\phi}_2...\hat{\phi}_n\frac{\partial}{\partial t_{n+1}}\hat{\phi}_{n+1}\big]|0\rangle \\ &=\frac{\partial}{\partial t_{n+1}} \langle 0|T\big[\hat{\phi}_1\hat{\phi}_2...\hat{\phi}_n\hat{\phi}_{n+1}\big]|0\rangle \\ &=\frac{\partial}{\partial t_{n+1}}N\int \mathcal{D}\phi e^{iS[\phi]} \phi_1\phi_2\cdots \phi_{n+1} \end{align} All is well as long as $$t_{n+1}$$ is not the same as any of the $$t_1,\cdots,t_n$$.
If $$t_{n+1}$$ is equal to some of the time variable $$t_i$$ of the other fields, then we cannot freely take the time derivative out of the time-ordering operator. Both sides would involve terms proportional to $$\delta(t_{n+1}-t_i)$$ as you can imagine. The same issue applies even if you use the Halmiltonian form.
The time-ordering operator $$T\{ \cdot \cdot \cdot \}$$ indicates that all the operators in the brackets should be ordered so that those at later times are always to the left of those at earlier times.