Sine collocation of square modified Helmholtz global relations (source code)

= Sine collocation of square modified Helmholtz global relations
{title2=$p_n=n\pi/2,\quad\omega_n=\sqrt{k^2+p_n^2}$}

On the square $[-1,1]^2$, write normal traces in $\phi_n(s)=\sin[n\pi(s+1)/2]$. Set $p_n=n\pi/2$, $\omega_n=\sqrt{k^2+p_n^2}$, $r_n=(\omega_n+p_n)/k$. Paired spectral samples $\{r_n,r_n^{-1}\}$, $\{-r_n,-r_n^{-1}\}$, $\{ir_n,i/r_n\}$, $\{-ir_n,-i/r_n\}$ give adjoint tests $e^{\mp\omega_ny}\phi_n(x)$ and $e^{\mp\omega_nx}\phi_n(y)$. Each test vanishes on the adjacent sides, removing their unknown <normal derivatives>.