Use the method of separation of variables to find a solution $u = u(x, y)$ to the PDE $$ \frac{\partial^2 u }{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0 $$ on the infinite strip $(-\infty, \infty) \times(-1, 0)$ subject to the boundary conditions $ \frac{\partial u}{\partial y}(x, 0) = \cos(2x)$ and $\frac{\partial u}{\partial y}(x, -1) = 0.$
Attempt at the solution:
Suppose $u(x, y) = f(x)g(y)$, then $$ f''(x) = -\lambda f(x), \ \ g''(y) = -\lambda g(y). $$ For $\lambda > 0:$ $$ g(y) = c_1 \cosh(\sqrt \lambda y)+c_2\sinh(\sqrt \lambda y) $$ and $$ f(x) = d_1 \sin(\sqrt \lambda x) + d_2 \cos(\sqrt \lambda x) $$ The boundary conditions on $f$ imply $c_2 = c_1 \tanh(\sqrt \lambda)$.
For $\lambda = 0:$ $$g(y) = e_1 y + e_2$$ and $$f(x) = f_1 x + f_2$$ The boundary conditions imply $g(y) = e_2.$
For $\lambda < 0:$
$$ g(y) = g_1 \cos(\sqrt \lambda y) + g_2 \sin(\sqrt \lambda y) $$ and $$f(x) = h_1 \cosh(\sqrt \lambda) + h_2 \sinh(\sqrt x)$$ The boundary conditions imply $g_2 = -g_1 \tan \sqrt \lambda.$
Due to the boundary condition on $y = 0$ I tried $\lambda = 4$ and obtained (after some algebra): $$ u(x, y) = c_1 d_2 \cosh(2y)\cos(2x) + c_2 d_2 \sinh(2y) \cos(2x). $$
After solving for $c_1, d_2, c_2,$ and $d_2$ I got $$ u(x, y) = \frac{1}{2} \tanh(2) \cos(2y) \cos(2x) + \frac{1}{2} \sinh(2y) \cos(2x) $$
Question:
This function satisfies the $\Delta u = 0$ on the domain and the boundary condition at $y = 0$ but not at $y = -1$. I suspect I made an algebra error but I cannot find where it happened. Before continuing, is this ad-hoc approach best? Is there a more systematic way to find the correct values for $\lambda$?