Dirichlet resonance for the forced sine equation (source code)

= Dirichlet resonance for the forced sine equation
{c}
{title2=$y''+y=-f,\quad y(0)=y(L)=0$}

A continuous forcing gives the solution with <zero> initial data $z(x)=-\int_0^x\sin(x-s)f(s)\,ds$. Every solution vanishing at <zero> is $A\sin x+z(x)$. If $\sin L\ne0$, the remaining endpoint determines $A$ uniquely, with <Green's function>
$$
G_L(x,s)=\frac{\sin(\min\{x,s\})\sin(L-\max\{x,s\})}{\sin L}.
$$
Its first derivative has jump $-1$, the correct sign for $-y''-y=f$. If $L=m\pi$ with a positive integer $m$, solvability instead requires $\int_0^L f(s)\sin s\,ds=0$, and the coefficient $A$ is free. This is the <Fredholm alternative> with a one-dimensional homogeneous kernel.