Solution (source code)

= Solution

Choose the time convention $e^{-i\omega t}$ and the outgoing <Sommerfeld radiation condition>. Define the <outgoing Green function for the three-dimensional Helmholtz equation> by
$$
G_k(\mathbf r,\mathbf r')=\frac{e^{ik|\mathbf r-\mathbf r'|}}{4\pi|\mathbf r-\mathbf r'|},\qquad
(\Delta_{\mathbf r}+k^2)G_k=-\delta(\mathbf r-\mathbf r').
$$
Away from $\mathbf r'$ it solves the homogeneous <Helmholtz equation>. Integrating its radial derivative over a small sphere gives $-1$ in the zero-radius limit, verifying the sign of the <Dirac delta distribution>. At infinity it satisfies $(\partial_R-ik)G_k=o(R^{-1})$.

\b[For the positive source on the right-hand side, the outgoing field is]
$$
\boxed{\psi(\mathbf r,k)=-\int_A
\frac{e^{ik|\mathbf r-\mathbf r'|}}{4\pi|\mathbf r-\mathbf r'|}
Q(\mathbf r')\,d^3\mathbf r'.}
$$
Applying the <Helmholtz equation> operator under this source representation gives $Q$. The minus sign is essential with the displayed <Green function> convention; defining the <Green function> to satisfy $LG=+\delta$ instead would absorb it. Here $A$ is the solid ball of radius $r_0$, as required by the volume source equation. Its finite volume and $Q\in L^2(A)$ make $Q$ integrable. The <Sommerfeld radiation condition> specifies the outgoing solution; without it one could add a homogeneous <Helmholtz equation> solution.