Laplace equation on a cylinder For the Laplace equation in 3D
$$\nabla^2 u =u_{xx}+u_{yy}+u_{zz}=0$$
in a right cylinder with an arbitrarily shaped base, whose top is $z=H$, bottom is $z=0$, we assume the following boundary conditions:
$$u_z(x,y,0)=0, u(x,y,H)=f(x,y)$$
and $u=0$ on the lateral sides.
Now, we can separate the $z$-variable by assuming $z(x,y,z)=M(x,y)N(z)$. Doing this, we will get the following two equations:
$$M_{xx}+M{yy}-\lambda M=0$$
$$N''+\lambda N=0$$
Now I'm asked to solve for $u(x,y,z)$ if the region is a rectangular box, where $0<x<L$, $0<y<W$, $0<z<H$.
I found that $N(z)=c_1 \cos(\sqrt{\lambda} z)$. But can we determine $\lambda$ from the given information? I'm lost at this time.
As the next step, I took $M(x,y)=F(x)G(y)$ and found that
$$F''=-\mu F(X)$$
$$G''=(\mu +\lambda)G(y)$$
But this doesn't help much because I need to find $\lambda$ in order to find $\mu$. Please help.
 A: $$ 
\nabla^2 u(x,y,z)=0
$$
$$
u(x,0,z)=u(x,W,z)=u(0,y,z)=u(L,y,z)=u_z(x,y,0)=0
$$
$$
u(x,y,H)=f(x,y)
$$
Our ansatz will be $u(x,y,z)=X(x)Y(y)Z(z)$, which reduces the 2nd order PDE to 3 2nd order ODE's.
$$
\frac{\mathrm{d}^2 X}{\mathrm{d} x^2}=-\lambda^2 X(x),\;\;\;X(0)=X(L)=0
$$
$$
\frac{\mathrm{d}^2 Y}{\mathrm{d}y^2}=-\mu^2 Y(y),\;\;\;Y(0)=Y(W)=0
$$
$$
\frac{\mathrm{d}^2 Z}{\mathrm{d} z^2}=(\lambda^2+\mu^2)Z(z),\;\;\;Z'(0)=0
$$ 
$$
X(x)=a_n \cos(\lambda x)+b_n \sin(\lambda x)
$$
$$
X(0)=0\Rightarrow a_n=0
$$
$$
X(L)=b_n \sin(\lambda L) = 0\Rightarrow \lambda L= n\pi,\;\;\;n\in\mathbb{Z}
$$
Similarly we find $Y(y) = c_n \sin(\mu y)$, to satisfy the B.C.'s if $\mu W = m \pi$, for any integer $m$.
$$
Z''(z) = (\lambda^2+\mu^2)Z(z)=\pi^2((\frac{n}{L})^2+(\frac{m}{W})^2)Z(z)
$$
$$
Z(z)=d_n \sinh(\pi z\sqrt{(\frac{n}{L})^2+(\frac{m}{W})^2})+e_n\cosh(\pi z\sqrt{(\frac{n}{L})^2+(\frac{m}{W})^2})
$$
$$
Z'(0)=0\Rightarrow d_n=0
$$
Thus 
$$
u(x,y,z)=C_{n,m}\sin(\frac{n\pi}{L} x)\sin(\frac{m\pi}{W} y)\cosh(\pi z\sqrt{(\frac{n}{L})^2+(\frac{m}{W})^2}) 
$$
is a solution for any $n,m\in \mathbb{Z}$, the PDE is linear so we take a superposition of all solutions.
$$
u(x,y,z)=\sum_{n,m\in\mathbb{N}}C_{n,m}\sin(\frac{n\pi}{L} x)\sin(\frac{m\pi}{W} y)\cosh(\pi z\sqrt{(\frac{n}{L})^2+(\frac{m}{W})^2}) 
$$
Now for the non homogeneous boundary conditions
$$
u(x,y,H)=\sum_{n,m\in\mathbb{N}}C_{n,m}\sin(\frac{n\pi}{L} x)\sin(\frac{m\pi}{W} y)\cosh(\pi H\sqrt{(\frac{n}{L})^2+(\frac{m}{W})^2}) =f(x,y)
$$
We can then take a Fourier decomposition to obtain
$$
C_{n,m}\frac{L}{2}\frac{W}{2}\cosh(\pi H\sqrt{(\frac{n}{L})^2+(\frac{m}{W})^2})=\int_{0}^{L}\int_{0}^{W}f(x,y)\sin(\frac{n\pi}{L}x)\sin(\frac{m\pi}{W}y)\mathrm{d}y\mathrm{d}x
$$
$$
C_{n,m}=\frac{\int_{0}^{L}\int_{0}^{W}f(x,y)\sin(\frac{n\pi}{L}x)\sin(\frac{m\pi}{W}y)\mathrm{d}y\mathrm{d}x}{\frac{L}{2}\frac{W}{2}\cosh(\pi H\sqrt{(\frac{n}{L})^2+(\frac{m}{W})^2})}
$$
