I have to prove that the solution $u$ of the following Poisson equation $$-\Delta u(x,y)=\sin(\pi x)\sin(\pi y)$$ for $(x,y)\in[0,1]^2$ with boundary conditions $$u(0,y)=u(1,y)=u(x,0)=u(x,1)=0$$ can be written as $v(x)\sin(\pi y)$.
So far I've written $u(x,y)=v(x,y)\sin(\pi y)$ and tried to get $\partial_y v(x,y)=0$, but I am stuck at $$\left((-\partial_x^2-\partial_y^2+\pi^2)v(x,y)-\sin(\pi x)\right)\sin(\pi y)=2\pi\partial_y v(x,y)\cos(\pi y)$$
Any idea?
You can try this solution $u(x, y)=\frac1{2\pi^2}\sin(\pi x)\sin(\pi y)$. You can verify directly that it obeys the given Poisson equation and the boundary conditions. So $v(x)=\frac1{2\pi^2}\sin(\pi x)$. Since the Poisson equation+Dirichlet boundary conditions in a closed and finite boundary has a unique solution, we are done.