Boundary value problem with nonhomogeneous conditions I am asked to solve the following boundary value problem
$$u_{xx}+u_{yy}=0, 0<x<1, 0<y<1 (1')$$
$$u(0,y)=0, u(1,y)= \sin{(\pi y)} \cos{(\pi y)}, 0<y<1$$
$$u(x,0)=u(x,1)=0, 0<x<1$$
I have done the following:
$$u(x,y)=v(x,y)+s(x)$$
$$v_{xx}+v_{yy}+s''(x)=0, 0<x<1, 0<y<1$$
$$v(0,y)+s(0)=0, 0<y<1$$
$$v(1,y)+s(1)=\sin{( \pi y)} \cos{( \pi y)}, 0<y<1$$
$$v(x,0)+s(x)=v(x,1)+s(x)=0, 0<x<1$$
So we have the following problems:
$$s''(x)=0, 0<x<1$$
$$s(0)=0, s(1)= \sin{( \pi y)} \cos{( \pi y)}$$
$$\text{ and }$$
$$v_{xx}+v_{yy}=0, 0<x<1, 0<y<1$$
$$v(0,y)=0, v(1,y)=0, 0<y<1$$
$$v(x,0)=v(x,1)=-s(x), 0<x<1$$
Is this correct so far??
 A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
It's always convenient to use first the homogeneous condition:
$$
{\rm u}\pars{x,y} = \sum_{n = 1}^{\infty}{\rm A}_{n}\pars{x}\sin\pars{n\pi y}
\quad\imp\quad
\sum_{n = 1}^{\infty}\bracks{%
{\rm A}_{n}''\pars{x} - \pars{n\pi}^{2}{\rm A}_{n}\pars{x}}\sin\pars{n\pi y} = 0
$$
Then,
$\ds{{\rm A}_{n}''\pars{x} - \pars{n\pi}^{2}{\rm A}_{n}\pars{x} = 0\quad\imp\quad
{\rm A}_{n}\pars{x} \equiv a_{n}\sinh\pars{n\pi x} + b_{n}\cosh\pars{n\pi x}}$

$$
{\rm u}\pars{x,y}
=
\sum_{n = 1}^{\infty}\bracks{%
a_{n}\sinh\pars{n\pi x} + b_{n}\cosh\pars{n\pi x}}\sin\pars{n\pi y}
$$

$$
\begin{array}{l}
{\rm u}\pars{0,y} =  0 =\sum_{n = 1}^{\infty}b_{n}\sin\pars{n\pi y}
\\
{\rm u}\pars{1,y} = \sin\pars{\pi y}\cos\pars{\pi y}
=\sum_{n = 1}^{\infty}\bracks{a_{n}\sinh\pars{n\pi} + b_{n}\cosh\pars{n\pi}}\sin\pars{n\pi y}
\end{array}
$$

Multiply both members of these equations by $\ds{\sin\pars{m\pi y}}$ and integrate over $\ds{\pars{0,1}}$. We'll get $\ds{b_{n} = 0\ \forall n = 1,2,\ldots}$ and
  \begin{align}
&\overbrace{\int_{0}^{1}\sin\pars{m\pi y}\sin\pars{\pi y}\cos\pars{\pi y}\,\dd y}
^{\ds{{1 \over 4}\,\delta_{m,2}}}\
=\sum_{n = 1}^{\infty}
a_{n}\sinh\pars{n\pi}\
\overbrace{\int_{0}^{1}\sin\pars{m\pi y}\sin\pars{n\pi y}\,\dd y}
^{\ds{\half\,\delta_{mn}}}
\\[3mm]&\imp\quad a_{m} = {1 \over 2\sinh\pars{2\pi}}\,\delta_{m,2}
\end{align}

$$\color{#00f}{\large%
{\rm u}\pars{x,y} = {\sinh\pars{2\pi x}\sin\pars{2\pi y} \over 2\sinh\pars{2\pi}}}
$$

Indeed, the solution was pretty obvious at the very beginning since
  $\ds{\sin\pars{\pi y}\cos\pars{\pi y} = \half\,\sin\pars{2\pi y}}$.

A: Let $u(x,y)=X(x)Y(y)$ and separate to obtain an $X$ problem and a $Y$ problem. The associated $y$ boundary conditions give you a pair of parallel sides with homogeneous BCs, so use that as your eigenvalue problem.
Once you have the $\lambda_n$ and $Y_n(y)$, find the general solution to the $X$ problem, $X_n(x)$. 
Superimpose to get $u(x,y)=\sum Y_n(y)X_n(x)$ where $X_n(x)$ involves two families of constants. Use the $X$ boundary conditions (one of which is nonhomogeneous) to determine those two families of constants.
