Laplace equation with split boundary conditions I am struggling with a Laplace equation with different boundary conditions:
Domain: $0 < x < W, \quad 0 < y < H$,
$$U_{xx} + U_{yy} = 0,$$ with these boundary conditions:
$$U_x(0,y) = 0,$$
$$U(x,0) = 0,$$
$$U_x(W,y) = 0,$$
$$U(x,H)= U_1 = \text{constant for } 0 < x < W_1,$$
$$U_y(x,H) = 0 \text{ for } W_1 < x < W,$$
My approach is to separate the domain into two zones: $0 < x < W_1$ and $W_1 < x < W$. Use the continuous conditions for boundary conditions at $x = W_1$.  
Is in this problem possible to derive an analytical solution?
 A: Hint: introduce a linking condition $U(W_1,y)=f(y)$ and separate the problem as two problems as follows:
$U_{xx}+U_{yy}=0$ , $0<x<W_1$ , $0<y<H$ with $U_x(0,y)=0$ , $U(W_1,y)=f(y)$ , $U(x,0)=0$ and $U(x,H)=U_1$
$U_{xx}+U_{yy}=0$ , $W_1<x<W$ , $0<y<H$ with $U(W_1,y)=f(y)$ , $U_x(W,y)=0$ , $U(x,0)=0$ and $U_y(x,H)=0$
For the first problem, with reference to http://eqworld.ipmnet.ru/en/solutions/lpde/lpde301.pdf#page=2 , we have special consideration:
$U(x,y)=\sum\limits_{n=1}^\infty A(n)\sinh\dfrac{n\pi(W_1-x)}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty B(n)\sinh\dfrac{n\pi x}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty C(n)\sin\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi(H-y)}{W_1}+\sum\limits_{n=1}^\infty D(n)\sin\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi y}{W_1}$
$U(x,0)=0$ :
$\sum\limits_{n=1}^\infty C(n)\sin\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi H}{W_1}=0$
$C(n)=0$
$\therefore U(x,y)=\sum\limits_{n=1}^\infty A(n)\sinh\dfrac{n\pi(W_1-x)}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty B(n)\sinh\dfrac{n\pi x}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty D(n)\sin\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi y}{W_1}$
$U(x,H)=U_1$ :
$\sum\limits_{n=1}^\infty D(n)\sin\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi H}{W_1}=U_1$
$D(n)=\dfrac{2}{W_1}\text{csch}\dfrac{n\pi H}{W_1}\int_0^{W_1}U_1\sin\dfrac{n\pi x}{W_1}dx=-\dfrac{2U_1}{n\pi}\text{csch}\dfrac{n\pi H}{W_1}\left[\cos\dfrac{n\pi x}{W_1}\right]_0^{W_1}=\dfrac{2U_1(1-(-1)^n)}{n\pi}\text{csch}\dfrac{n\pi H}{W_1}$
$\therefore U(x,y)=\sum\limits_{n=1}^\infty A(n)\sinh\dfrac{n\pi(W_1-x)}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty B(n)\sinh\dfrac{n\pi x}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty\dfrac{2U_1(1-(-1)^n)}{n\pi}\text{csch}\dfrac{n\pi H}{W_1}\sin\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi y}{W_1}$
$U(W_1,y)=f(y)$ :
$\sum\limits_{n=1}^\infty B(n)\sinh\dfrac{n\pi W_1}{H}\sin\dfrac{n\pi y}{H}=f(y)$
$B(n)=\dfrac{2}{H}\text{csch}\dfrac{n\pi W_1}{H}\int_0^Hf(y)\sin\dfrac{n\pi y}{H}dy$
$\therefore U(x,y)=\sum\limits_{n=1}^\infty A(n)\sinh\dfrac{n\pi(W_1-x)}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty\dfrac{2}{H}\sinh\dfrac{n\pi x}{H}\sin\dfrac{n\pi y}{H}\text{csch}\dfrac{n\pi W_1}{H}\int_0^Hf(y)\sin\dfrac{n\pi y}{H}dy+\sum\limits_{n=1}^\infty\dfrac{2U_1(1-(-1)^n)}{n\pi}\text{csch}\dfrac{n\pi H}{W_1}\sin\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi y}{W_1}$
$U_x(x,y)=\sum\limits_{n=1}^\infty\dfrac{n\pi A(n)}{H}\cosh\dfrac{n\pi(W_1-x)}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty\dfrac{2n\pi}{H^2}\cosh\dfrac{n\pi x}{H}\sin\dfrac{n\pi y}{H}\text{csch}\dfrac{n\pi W_1}{H}\int_0^Hf(y)\sin\dfrac{n\pi y}{H}dy+\sum\limits_{n=1}^\infty\dfrac{2U_1(1-(-1)^n)}{W_1}\text{csch}\dfrac{n\pi H}{W_1}\cos\dfrac{n\pi x}{W_1}\sinh\dfrac{n\pi y}{W_1}$
$U_x(0,y)=0$ :
$\sum\limits_{n=1}^\infty\dfrac{n\pi A(n)}{H}\cosh\dfrac{n\pi W_1}{H}\sin\dfrac{n\pi y}{H}+\sum\limits_{n=1}^\infty\dfrac{2n\pi}{H^2}\sin\dfrac{n\pi y}{H}\text{csch}\dfrac{n\pi W_1}{H}\int_0^Hf(y)\sin\dfrac{n\pi y}{H}dy+\sum\limits_{n=1}^\infty\dfrac{2U_1(1-(-1)^n)}{W_1}\text{csch}\dfrac{n\pi H}{W_1}\sinh\dfrac{n\pi y}{W_1}=0$
