Solution of Klein-Gordon equation in momentum space I'm solving Klein-Gordon equation in order to get scalar field expression
$$(\partial^2 + m^2)\phi=0$$
I expand the solution $\phi$ into Fourier integral in momentum space
$$\phi=\int\frac{d^4p}{(2\pi)^4}\varphi(p)e^{-i \langle p, x \rangle}$$
where $\langle p,x \rangle = p^0t-(p^1x^1 + p^2x^2 + p^3x^3)$. Substituting into the equation gives
$$\int\frac{d^4p}{(2\pi)^4}(-p^2 + m^2)\varphi(p)e^{-i \langle p, x \rangle}=0 \implies (-p^2 + m^2)\varphi(p)=0$$
There a book tells that the solution of a gotten algebraic equation is $\varphi(p) = 2\pi\delta(m^2-p^2)\bar\varphi(p)$. I have some difficulties figuring out a couple of points considering this.
Since we've gotten a solution in terms of distributions, then the equation is considered in distribution space, and such a result is somehow linked with a known result $xf(x) = 0 \implies f(x) = C \delta(x)$.
So, the points are:

*

*If I'm right and the eq is solved in terms of distributions, why there is a function $\bar\varphi(p)$ dependent upon $p$ instead of constant $C$?

*There are examples of solving diff equations using expansion into Fourier integral, and an algebraic equation is solved as an ordinary one. So is it there any rule that indicates that equation should be solved in terms of distributions or just as an ordinary one?

 A: As I've found out from the internet:

*

*The solution of an algebraic equation  $g(x)f(x)=0$, where $g(x)$ is a smooth function, is $f(x)=\delta(g(x))h(x)$, where $h(x)$ - arbitrary function

*Yes, there is - if we searched for solution in terms of generalized functions we'd probably get Fourier image as a distribution (Fourier transform is closed), so we'd have to solve an algebraic equation in generalized function terms

These 2 answers generate other questions:

*

*I haven't found the property $g(x)f(x)=0 \Rightarrow f(x)=\delta(g(x))h(x)$ in any gf book. Mb, someone can name it or provide a book ref or a proof - I'd appreciate this.

*Why does we search for solution of KGE in terms of generalized functions? Does it reflect that we are looking for operator $\hat\phi$ (linear functional) rather than an ordinary function $\phi$?

A: The way to interpret the solution $(m^2-p^2)\varphi(p)=0$ is that for each value of $p$, either $\varphi(p)=0$ or $(m^2-p^2)=0$ (or both).
This implies that the integrand of the Fourier integral $\varphi(p)e^{-i \langle p, x \rangle}$ vanishes whenever $(m^2-p^2)\neq 0$. The delta function encodes that property. We are left with an arbitrary $\bar\varphi(p)$ when $(m^2-p^2)=0$, which must be determined by initial conditions, for example, a plane wave solution $e^{i (m t-p\hat k \vec x)}$ with $\hat k$ being a unit direction vector.
