Solution (source code)

= Solution

For large $r=|\mathbf r|$, the outgoing kernel has
$$
G_k(\mathbf r,\mathbf r')=\frac{e^{ikr}}{4\pi r}e^{-ik\widehat{\mathbf r}\cdot\mathbf r'}+O(r^{-2}),\qquad \partial_{n'}G_k=-ik(\widehat{\mathbf r}\cdot\mathbf n')\frac{e^{ikr}}{4\pi r}e^{-ik\widehat{\mathbf r}\cdot\mathbf r'}+O(r^{-2}).
$$
Thus the <surface representation of an obstacle far-field pattern>, with $\psi_s=e^{ikr}f_\infty/r+O(r^{-2})$, gives
$$
\boxed{f_\infty(\widehat{\mathbf r},\widehat{\mathbf r}_0,k)=-\frac1{4\pi}\int_{\partial D}e^{-ik\widehat{\mathbf r}\cdot\mathbf r'}[\partial_{n'}\psi_s+ik(\widehat{\mathbf r}\cdot\mathbf n')\psi_s]\,dS'.}
$$
Conjugating the <Herglotz wave function> gives $\overline{v_g}(\mathbf r')=\int_{S^2}e^{-ik\widehat{\mathbf r}\cdot\mathbf r'}\overline{g(\widehat{\mathbf r})}\,dS$. Interchanging the angular and obstacle-surface integrals yields the <Herglotz pairing with an obstacle far field>:
$$
\boxed{\int_{S^2}f_\infty(\widehat{\mathbf r},\widehat{\mathbf r}_0,k)\overline{g(\widehat{\mathbf r})}\,dS=\frac1{4\pi}\int_{\partial D}[\psi_s\partial_{n'}\overline{v_g}-\overline{v_g}\partial_{n'}\psi_s]\,dS'.}
$$
This contains only the scattered-field boundary traces and the Herglotz function, with the outward-obstacle normal convention fixing the sign.