<s>[INST] Solve the dirichlet pde with the given conditions. Solve the Dirichelt problem:
$$\nabla^2u(x,y)=0$$ 
$$0\le x\le3,0<y<7$$
$$$u(x,0)=0, u(x,7)=sin((\pi)x/3$$  $$9\le x\le3$$
$$u(0,y)=u(3,y)=0$$ 
$$0\le y\le7$$
Using separation of variables I found that $X(0)=0$ and $X(3)=0$ because $u(0,y)=u(3,y)=0$. Also, $u(x,0)=0$ so $Y(0)=0$ and $u(x,7)=sin(\pi x/3)$. I found that $\lambda=n^2$ (this came from previous calculations from a different problem) and $X_n=sin(\pi x/3)$. I am having trouble with the $Y''-n^2Y=0$. The solution for Y would be $Y=ae^{-n y}
+be^{n y}$. If you plug $0$ in for y then you would get $a+b=0$ so $a=-b$ or vice versa. Is this right? I get the purpose of this is to find $Y_n$ so you can combine that with $X_n$ to get the solution of $u(x,t)$. Am I on the right track?
 [/INST] Although your approach is not completely wrong, your approach is not the best.
Note that for $\nabla^2u(x,y)=0$ with conditions of the types $u(x,0)$ , $u(x,7)$ , $u(0,y)$ and $u(3,y)$ , according 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(3-x)}{7}\sin\dfrac{n\pi y}{7}+\sum\limits_{n=1}^\infty B(n)\sinh\dfrac{n\pi x}{7}\sin\dfrac{n\pi y}{7}+\sum\limits_{n=1}^\infty C(n)\sin\dfrac{n\pi x}{3}\sinh\dfrac{n\pi(7-y)}{3}+\sum\limits_{n=1}^\infty D(n)\sin\dfrac{n\pi x}{3}\sinh\dfrac{n\pi y}{3}$
$u(0,y)=0$ :
$\sum\limits_{n=1}^\infty A(n)\sinh\dfrac{3n\pi}{7}\sin\dfrac{n\pi y}{7}=0$
$A(n)=0$
$\therefore u(x,y)=\sum\limits_{n=1}^\infty B(n)\sinh\dfrac{n\pi x}{7}\sin\dfrac{n\pi y}{7}+\sum\limits_{n=1}^\infty C(n)\sin\dfrac{n\pi x}{3}\sinh\dfrac{n\pi(7-y)}{3}+\sum\limits_{n=1}^\infty D(n)\sin\dfrac{n\pi x}{3}\sinh\dfrac{n\pi y}{3}$
$u(3,y)=0$ :
$\sum\limits_{n=1}^\infty B(n)\sinh\dfrac{3n\pi}{7}\sin\dfrac{n\pi y}{7}=0$
$B(n)=0$
$\therefore u(x,y)=\sum\limits_{n=1}^\infty C(n)\sin\dfrac{n\pi x}{3}\sinh\dfrac{n\pi(7-y)}{3}+\sum\limits_{n=1}^\infty D(n)\sin\dfrac{n\pi x}{3}\sinh\dfrac{n\pi y}{3}$
$u(x,0)=0$ :
$\sum\limits_{n=1}^\infty C(n)\sinh\dfrac{7n\pi}{3}\sin\dfrac{n\pi x}{3}=0$
$C(n)=0$
$\therefore u(x,y)=\sum\limits_{n=1}^\infty D(n)\sin\dfrac{n\pi x}{3}\sinh\dfrac{n\pi y}{3}$
$u(x,7)=\sin\dfrac{\pi x}{3}$ :
$\sum\limits_{n=1}^\infty D(n)\sinh\dfrac{7n\pi}{3}\sin\dfrac{n\pi x}{3}=\sin\dfrac{\pi x}{3}$
$D(n)=\begin{cases}\text{csch}\dfrac{7\pi}{3}&\text{when}~n=1\\0&\text{when}~n\neq1\end{cases}$
$\therefore u(x,y)=\text{csch}\dfrac{7\pi}{3}\sin\dfrac{\pi x}{3}\sinh\dfrac{\pi y}{3}$
Note that this solution suitable for $x,y\in\mathbb{C}$ , not only suitable for $0\leq x\leq3$ and $0<y<7$ .
</s>