I was hoping for an explanation of the following steps in taking the Fourier transform of the Klein-Gordon equation.
\begin{equation} \phi (\boldsymbol x,t)=\int \frac{d^3p}{(2\pi)^3}e^{ip\cdot x}\phi(\boldsymbol p,t)\nonumber \end{equation} Entering this expression into the Klein-Gordon equation, \begin{equation} \int \frac{d^3p}{(2\pi)^3}e^{ip\cdot x}\bigg(\frac{\partial ^2}{\partial t^2}-\nabla ^2+m^2\bigg)\phi(\boldsymbol p,t)=\int \frac{d^3p}{(2\pi)^3}e^{ip\cdot x}\bigg(\frac{\partial ^2}{\partial t^2}-\boldsymbol p^2+m^2\bigg)\phi(\boldsymbol p,t)=0\nonumber \end{equation}
\begin{equation} \int d^3x\frac{d^3p}{(2\pi )^3}e^{i(p-p')\cdot x}\bigg(\frac{\partial ^2}{\partial t^2}+\boldsymbol p^2+m^2\bigg)\phi(\boldsymbol p,t)=0\ \ \ \ \ \ \ \ \ \ (?) \end{equation} Then $\int d^3xe^{-i(p-p')\cdot x}=\delta (p-p')$ (?), \begin{equation} \int \frac{d^3p}{(2\pi )^3}\delta (p-p')\bigg(\frac{\partial ^2}{\partial t^2}-\boldsymbol p^2+m^2\bigg)\phi(\boldsymbol p,t)=0 \end{equation} Finally by the properties of the delta function this gives,
\begin{equation} \bigg(\frac{\partial ^2}{\partial t^2}-\boldsymbol p^2+m^2\bigg)\phi(\boldsymbol p,t)=0 \end{equation} How is it possible to add in the $d^3x$ and integrate over that and why does the argument of the exponential change to $p-p'$, and finally why does $\int d^3xe^{-i(p-p')\cdot x}=\delta (p-p')$?