Solution (source code)

= Solution

For <Laplace's equation>, seek a nonzero separated product $f=X(x)Y(y)$. Dividing by $XY$ gives $X''/X=-Y''/Y$, so both sides are a <separation constant>. Choosing it as $-k^2$ gives $X''+k^2X=0$, $Y''-k^2Y=0$, with trigonometric and <hyperbolic functions>, respectively. A zero constant gives linear factors; a positive constant interchanges the two types. <Boundary conditions> determine which modes are allowed, and <linearity> permits their superposition to match the remaining boundary data.