- Consider the Laplacian equation in cylindrical coordinates with no theta $\left(~\theta~\right)$ dependence: \begin{align} &\mbox{So,}\quad\frac{1}{r} (r(u)_r)_r + (u)_{zz} = 0 \\[2mm] &\mbox{subject to}\quad \left\{\begin{array}{rcl} u\left(r=R,z\right) & = & 1 \\ u\left(r=0,z\right) & = & \text{finite} \\ u\left(r,z=\pm H\right) & = & 0 \end{array}\right. \end{align}
- Using separation of variables, $u(r,z) = A(r)B(z)$, we get $$B''=-\lambda ^2 B \\ rA'' + A' - \lambda^2 r A = 0$$
- Solving the $B(z)$ equation and imposing the boundary conditions, I get, $$c_1 \cos(\lambda H) + c_2\sin(\lambda H) = 0 \\ c_1 \cos(\lambda H) - c_2\sin(\lambda H) = 0$$ I was told that this was incorrect, and I should be using $\sinh$ and $\cosh$ functions to this DE. My question is, why is that allowed? Aren't they non-periodic?
What am I doing wrong here, and how am I supposed to know when to use $\sin$ and $\cos$, and when to use $\sinh$ and $\cosh$ when solving PDEs?

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\on}[1]{\operatorname{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $ {\Large ?}:\quad\left\{\begin{array}{l} \ds{{1 \over r}\partiald{}{r} \bracks{r\,\partiald{\on{u}\pars{r,z}}{r}} + \partiald[2]{\on{u}\pars{r,z}}{z} = 0} \\[3mm] \ds{\on{u}\pars{r,\pm H} = 0} \\[3mm] \left.\begin{array}{rcl} \ds{\on{u}\pars{0,z}} & \mbox{is} & \ds{finite}. \\[1mm] \ds{\on{u}\pars{R,z}} & \ds{=} & \ds{1} \end{array}\right\} \end{array}\right. $
Note that $\ds{\on{u}\pars{r,z}}$ already satisfies the boundary conditions at $\ds{z = \pm H}$ and, in addition, it exhibits the $\ds{z \mapsto -z}$ symmetry. Also, \begin{equation} \int_{-H}^{H}\cos\pars{k_{m}z} \cos\pars{k_{n}z}\,\dd z = H\,\delta_{mn} \label{1}\tag{1} \end{equation}