Path Integral Derivation of the QED free field Generating Functional This is following a derivation found in Mandl & Shaw's QFT.
The free field generating functional for QED is $Z_0 [J_{\kappa}, \sigma, \bar{\sigma}] = Z_0 [J_{\kappa}]Z_0 [\sigma, \bar{\sigma}]$. It is separated into two parts, one with the free electromagnetic field and one with the free spinor fields. They are derived in a similar way, for instance for the electromagnetic field
$$ Z_0 [J_{\kappa}] = \frac{1}{N} \int \mathcal{D}A \text{exp}\big\{iX[J_{\kappa}]\big\},$$
where $N$ ensures normalization and $X[J_{\kappa}]$ is the action without any spinor fields defined by
$$ X[J_{\kappa}] = \int d^4x\left\{\frac{-1}{2}(\partial_{\nu}A_{\mu})(\partial^{\nu}A^{\mu}) + J_{\kappa}(x)A^{\kappa}(x)\right\}.$$
In Mandl & Shaw the generating functional is found by first manipulating the expression for the action. By defining a wave operator
$$ K^{\mu\nu}(x,x') = -g^{\mu\nu}\delta^{(4)}(x-x')\Box_{x'} $$
and its inverse by
$$ \int d^4x' K^{\mu\nu}(x,x') K_{\nu\tau}^{-1}(x',x'') = g^{\mu}_{\tau}\delta^{(4)}(x-x''), $$
the action may be expressed as
$$ X[J_{\kappa}] = \frac{-1}{2}\int d^4x ~ d^4x' A_{\mu}(x)K^{\mu\nu}(x,y)A_{\nu}(y) + \int d^4xJ_{\kappa}(x)A^{\kappa}(x). $$
By introducing a shifted electromagnetic field $A_{\mu}'(x)$ according to
$$ A_{\mu}'(x) = A_{\mu}(x) - \int d^4x'~ K^{-1}_{\mu\nu}(x,x')J^{\nu}(x')$$
and substituting it into the definition of the action, I obtain the following expression
$$ X[J_{\kappa}] = \frac{-1}{2} \int d^4x ~ d^4y \left[A_{\mu}(x) - \int d^4x' K_{\mu\tau}^{-1}(x,x')J^{\tau}(x')\right] \times K^{\mu\nu}(x,y) \left[A_{\nu}(y) - \int d^4y' K_{\nu\sigma}^{-1}(y,y')J^{\sigma}(y')\right] \\ + \int d^4x ~ J_{\kappa}g^{\kappa\mu} \big[A_{\mu}(x) - \int d^4x' ~ K_{\mu\nu}^{-1}(x,x')J^{\nu}(x')\big]. $$
Apparently, it should be possible, by only using the definition of the inverse wave operator above, to express this action in terms of the shifted potential as
$$ X[J_{\kappa}] = \frac{1}{2} \big[J^{\kappa}K^{-1}_{\kappa\lambda}J^{\lambda}\big] - \frac{1}{2}\big[A_{\mu}'K^{\mu\nu}A_{\nu}'\big].$$
I can handle some of the terms and sort of see how this might be possible. But for instance the term
$$ \frac{1}{2} \int d^4x ~ d^4x' K_{\mu\tau}^{-1}(x,x')J^{\tau}(x') \int d^4y ~ K^{\mu\nu}(x,y) A_{\nu}(y) $$
I cannot figure out what to do since the order of the wave operator and its inverse, as well as their variables, are too far off the definition given in the book and above. Could someone who is more confident with tensor calculus make this derivation or give some hints as to how it should be done?
Solving similar derivations seems to be the key to understanding the path integral formalism for not only QED but for QCD as well since the approach is always similar. This is also the key to finding expressions for the propagator functions in both QED and QCD, so this is very important.
 A: It all boils down to simple linear algebra. To make it transparent, let me define a symmetric inner product
$$\left<\bullet,\circ\right>:= \int\mathrm{d}^4x\ \bullet\!(x)\cdot\circ(x),\tag{1} $$
where the $\cdot$ means contraction of all Lorentz indices. Using this and integrating by parts, you can write the original action as
$$X[A,J] = \frac12\left<A,\mathbb{K} A\right>+\left<J,A\right>.\tag{2}$$
where, $\mathbb{K}$ is the wave operator defined in your book, which is self-adjoint with respect to the inner product (1), namely
$$ \left<\bullet,\mathbb{K}\circ\right>=\left<\mathbb{K}\bullet,\circ\right>.$$
Note that the notation $\mathbb{K}\bullet$ in this space, really means
$$ [\mathbb{K}\bullet](x) := \int \mathrm{d}^4y\ \mathbb{K}(x,y)\cdot \bullet(y).$$
Now, defining
$$A'=A-\mathbb{K}^{-1}J$$
and plugging it back into the action (2) we have
\begin{align}X[A,J] &=\frac12\left<A'-\mathbb{K}^{-1}J,\mathbb{K}\left(A'-\mathbb{K}^{-1}J\right)\right>+\left<J,A'-\mathbb{K}^{-1}J\right> = \\
&= \frac12 \Big(\left<A',\mathbb{K}A'\right>-\left<J,A'\right>-\left<A',J\right>+\left<J,\mathbb{K}^{-1}J\right>\Big)+\left<J,A'\right>-\left<J,\mathbb{K}^{-1}J\right> =\\
&=\frac12 \left<A',\mathbb{K}A'\right> -\frac12\left<J,\mathbb{K}^{-1}J\right>,
\end{align}
which reinstating the definition of the inner product is precisely your desired action.
