Dirichlet Helmholtz Green function on an interval (source code)

= Dirichlet Helmholtz Green function on an interval
{title2=$G(x,\xi)=-\sin(kx_<)\sin(k(\ell-x_>))/(k\sin(k\ell))$}

For $\partial_x^2+k^2$ on $(0,\ell)$ with zero endpoint values and $\sin(k\ell)\ne0$, let $x_<=\min(x,\xi)$ and $x_>=\max(x,\xi)$. The displayed <Green function> is continuous at $x=\xi$ and its first derivative has jump one, giving unit <Dirac delta> forcing. The formula follows from the left solution $\sin(kx)$ and right solution $\sin(k(\ell-x))$, whose <Wronskian> is $-k\sin(k\ell)$. At $k=0$ its limit is $-x_<(\ell-x_>)/\ell$, although zero is excluded by a condition that $k$ is not an integer in the length-$\pi$ version.