Analytical solution of Laplace's equation with robin/third boundary condition I'm new to PDE solution, and feel difficult to solve the Laplace's equation with robin boundary conditions.
The equation $\Delta u=0$ with boundary conditions shown in the picture:
picture of problem.
Does this problem has an analytical solution? if so, what is it?
 A: Using separation of variables $u = X(x)Y(y)$, we obtain the ODEs
\begin{align}
X'' &= -\lambda X \\
Y'' &= \lambda Y
\end{align}
where we used $-\lambda$ for our separation constant, with associated boundary conditions
\begin{align}
u(L,y) &= 0 \implies X(L) = 0 \\
u_{x}(0,y) &= 0 \implies X'(0) = 0 \\
u_{y}(x,0) - hu(x,0) &= 0 \implies Y'(0) - hY(0) = 0
\end{align}
Solving the ODE in $X$, we find non-trivial solutions only if $\lambda > 0$ which yields
$$X = A \cos \sqrt{\lambda} x + B \sin \sqrt{\lambda} x$$
Now
\begin{align}
X'(0) &= \sqrt{\lambda} B \\
&= 0 \\
\implies B &= 0 \quad \text{(why?)} \\
\therefore X(L) &= A \cos \sqrt{\lambda} L \\
&= 0 \\
\implies \sqrt{\lambda} L &= \frac{(2n + 1) \pi}{2}, \quad n \ge 0 \quad \text{($A \ne 0$ for non-trivial solutions)} \\
\implies \lambda &= \frac{(2n + 1)^{2} \pi^{2}}{4L^{2}}, \quad n \ge 0 \quad(*)
\end{align}
and hence
$$X_{n} = A \cos \left( \frac{(2n + 1) \pi x}{2L} \right)$$
Using the eigenvalue $(*)$ and solving the ODE in $Y$ yields
$$Y = \frac{1}{h} \cdot \frac{(2n + 1) \pi }{2L} \cosh \left(\frac{(2n + 1) \pi y}{2L} \right) + \sinh \left(\frac{(2n + 1) \pi y}{2L} \right)$$
and so the general solution is given by 
$$u(x,y) = \sum_{n \ge 0} A_{n} \cos \left( \frac{(2n + 1) \pi x}{2L} \right) \left[ \frac{1}{h} \cdot \frac{(2n + 1) \pi }{2L} \cosh \left(\frac{(2n + 1) \pi y}{2L} \right) + \sinh \left(\frac{(2n + 1) \pi y}{2L} \right)\right]$$
Applying the inhomogeneous condition, we find
\begin{align}
u(x,L) &= u_{0} \\
&= \sum_{n \ge 0} A_{n} \cos \left( \frac{(2n + 1) \pi x}{2L} \right) \left[ \frac{1}{h} \cdot \frac{(2n + 1) \pi }{2L} \cosh \left(\frac{(2n + 1) \pi}{2} \right) + \sinh \left(\frac{(2n + 1) \pi}{2} \right)\right] \\
&= \sum_{n \ge 0} C_{n} \cos \left( \frac{(2n + 1) \pi x}{2L} \right)
\end{align}
where 
$$C_{n} = A_{n} \left[ \frac{1}{h} \cdot \frac{(2n + 1) \pi }{2L} \cosh \left(\frac{(2n + 1) \pi}{2} \right) + \sinh \left(\frac{(2n + 1) \pi}{2} \right)\right]$$
You can now solve for the coefficients $C_{n}$ using orthogonality relations. Note that when doing the integrals, a change of variable might help.
A: $\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{\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}$
The first step sets
$\ds{\mrm{u}_{x}\pars{x,y} = \sum_{k\ \in\ \mathbb{R}\setminus\braces{0}}
\mrm{a}\pars{k,y}\sin\pars{kx}}$ which satisfies the boundary condition $\ds{\mrm{u}_{x}\pars{0,y} = 0}$. Then,
\begin{align}
&\mrm{u}\pars{x,y} = 
-\sum_{k\ \in\ \mathbb{R}\setminus\braces{0}}
\mrm{a}\pars{k,y}{\cos\pars{kx} \over k} + \mrm{f}\pars{y}
\end{align}
The boundary condition $\ds{\mrm{u}\pars{L,y} = 0}$ is satisfied by choosing
$\ds{k \in \braces{k_{n}\ \mid\ k_{n} = \pars{2n + 1}{\pi \over 2L}\,,\
n = 1,2,3,\ldots}}$ and
$\ds{\mrm{f}\pars{y} = 0}$. The general solution becomes
$$
\mrm{u}\pars{x,y} = \sum_{n = 1}^{\infty}
\mrm{a}_{n}\pars{y}{\cos\pars{k_{n}x} \over k_{n}}
$$
which must satisfies the Laplace differential equation. Namely,
$$
\sum_{n = 1}^{\infty}
\bracks{\mrm{a}_{n}''\pars{y} -
k_{n}^{2}\,\mrm{a}_{n}\pars{y}}{\cos\pars{k_{n}x} \over k_{n}} = 0
$$
which leads to
$\ds{\mrm{a}_{n}\pars{y} = b_{n}\sinh\pars{k_{n}y} +
c_{n}\cosh\pars{k_{n}y}}$ such that
$$
\mrm{u}\pars{x,y} = \sum_{n = 1}^{\infty}
\bracks{b_{n}\sinh\pars{k_{n}y} +
c_{n}\cosh\pars{k_{n}y}}{\cos\pars{k_{n}x} \over k_{n}}
$$
One of the remaining boundary conditions
$\ds{\pars{~\mrm{u}\pars{x,L} = u_{0}~}}$ leads to
$$
u_{0} =
\sum_{n = 1}^{\infty}
\bracks{b_{n}\sinh\pars{k_{n}L} + c_{n}\cosh\pars{k_{n}L}}
{\cos\pars{k_{n}x} \over k_{n}}
$$
Multiply both members by $\ds{2\cos\pars{k_{n}x}/L}$ and integrate over $\ds{x \in\pars{0,L}}$:
\begin{align}
&u_{0}\
\overbrace{\int_{0}^{L}{2\cos\pars{k_{n}x} \over L}\,\dd x}
^{\ds{{4 \over \pi}\,{\pars{-1}^{n} \over 2n + 1}}}\ =\
{b_{n}\sinh\pars{k_{n}L} + c_{n}\cosh\pars{k_{n}L} \over k_{n}}
\\[2mm] &\ \implies
\bbx{b_{n}\sinh\pars{k_{n}L} + c_{n}\cosh\pars{k_{n}L} = 
{2\pars{-1}^{n} \over L}\,u_{0}} \label{1}\tag{1}
\\ &
\end{align}
The last boundary condition
$\ds{\pars{~\mrm{u}_{y}\pars{x,0} = h\,\mrm{u}\pars{x,0}~}}$
yields
\begin{align}
&\sum_{n = 1}^{\infty}
b_{n}\cos\pars{k_{n}x} =
h\sum_{n = 1}^{\infty}
c_{n}{\cos\pars{k_{n}x} \over k_{n}}
\\[2mm] \implies &\
\bbx{k_{n}b_{n} - h\, c_{n} = 0} \label{2}\tag{2} \\ &
\end{align}
(\ref{1}) and (\ref{2}) yield:
$$
\left\{\begin{array}{lcl}
\ds{b_{n}} & \ds{=} &
\ds{\pars{-1}^{n}\,{h \over k_{n}\cosh\pars{k_{n}L} +
h\sinh\pars{k_{n}L}}\,{2u_{0} \over L}}
\\[1mm]
\ds{c_{n}} & \ds{=} &
\ds{\pars{-1}^{n}\,{k_{n} \over k_{n}\cosh\pars{k_{n}L} +
h\sinh\pars{k_{n}L}}\,{2u_{0} \over L}}
\end{array}\right.
$$
and
\begin{align}
&\mbox{}
\\ 
&\mrm{u}\pars{x,y}
\\ = &\ \bbx{{2u_{0} \over L}
\sum_{n = 1}^{\infty}\pars{-1}^{n}\,
{h\sinh\pars{k_{n}y} + k_{n}\cosh\pars{k_{n}y} \over
k_{n}\cosh\pars{k_{n}L} +
h\sinh\pars{k_{n}L}}
{\cos\pars{k_{n}x} \over k_{n}}}
\\ & \bbx{\mbox{with}\ k_{n} = \pars{2n +1}\,{\pi \over 2L}}
\\ &
\end{align}
