Solve the pde with separation of variables. 
Solve
  $$\begin{cases}
u_{xx}+u_{yy}=0 \ \ &\text{for} \ \ 0\le x\le a, 0\le y \le b,\\
u(0,y)=u(a,y)=0 \ \    \\
u(x,0) = \sin\frac{\pi x}{a},u(x,b)=0   \ \ \\
\end{cases}$$

Let $u=X(x)Y(y)$ ,then $\frac{X''}{X}=-\frac{Y''}{Y}=-\lambda $. After some calculations, I can get $$u=\sum_{k=1}^{\infty}[A_ke^{\frac{k\pi y}{a}}+B_ke^{\frac{-k\pi y}{a}}]\sin(\frac{k\pi x}{a})$$
But I feel trouble to determine $A_k,B_k$ , the conditions I hasn't use are$u(x,0) = \sin\frac{\pi x}{a},u(x,b)=0$ , but with these I can only make sure $A_1+B_1=1$, the left is unknown, what's the problem of mine.
 A: The 3rd homogeneous condition requires $Y_k(b)=0$ $\forall k$, so you need
$$ A_ke^{k\pi b/a} + B_k e^{-k\pi b/a} = 0 \implies \frac{A_k}{B_k} = -\frac{e^{-k\pi b/a}}{e^{k\pi b/a}} $$
For convenience, let's have 
$$ A_k = -c_ke^{-k\pi b/a}, \ B_k = c_ke^{k\pi b/a} $$
So we end up with
$$ Y_k(y) = c_k\big[-e^{k\pi (y-b)/a} + e^{k\pi (b-y)/a} \big] = c_k \sinh\left(k\pi \frac{b-y}{a} \right) $$
So
$$ u(x,y) = \sum_{k=1}^\infty c_k \sinh\left(k\pi \frac{b-y}{a} \right) \sin \left( k\pi\frac{x}{a}\right) $$
The last B.C. gives
$$ u(x,0) = \sum_{k=1}^\infty c_k \sinh\left(k\pi \frac{b}{a} \right) \sin \left( k\pi\frac{x}{a}\right) = \sin\left(\frac{\pi x}a{}\right) $$
Typically, you'd have to decompose the boundary function into its Fourier series. But notice, this already is its own Fourier series, so comparing the coefficients gives
\begin{cases}
c_1\sinh\left(\pi \frac{b}{a} \right) = 1 \\
c_k = 0, & k > 1
\end{cases}
The final solution is
$$ u(x,y) = \frac{1}{\sinh\left(\frac{\pi b}{a}\right)}\sinh\left(\pi \frac{b-y}{a} \right) \sin \left(\frac{\pi x}{a}\right) $$
