Poisson equation, exact solution 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?
 A: Solution can be founded in a form
$$
u(x, y) = \int\limits_0^1 dx_0 \int\limits_0^1 G(x_0, y_0, x, y) \sin(\pi x_0)\sin(\pi y_0) dy_0,
$$
where $G$ is Green's function. In your problem $G$ has a form
$$G(x_0, y_0, x, y) = 4 \sum\limits_{n,m=1}^{\infty} \frac{\sin(\pi n x) \sin(\pi n x_0) \sin(\pi m y) \sin(\pi m y_0)}{ \pi^2 (n^2 + m^2) }$$
Using orthogonality of system $\{\sin(\pi m y)\}_{m=1}^\infty$ on range $y \in [0,1]$, we can get $\int\limits_0^1 \sin(\pi y_0) \sin(\pi m y_0) dy_0 = \frac{\delta_{1,m}}2 $. Now, we can write
$$
u(x, y) = \int\limits_0^1 dx_0 \int\limits_0^1  4 \sum\limits_{n=1}^{\infty} \frac{\sin(\pi n x) \sin(\pi n x_0) \sin(\pi y) \sin(\pi y_0)}{ \pi^2 (n^2 + 1) } \sin(\pi x_0)\sin(\pi y_0) dy_0,
$$
or
$$
u(x, y) = \sin(\pi y) \left( 2\int\limits_0^1 \sum\limits_{n=1}^{\infty} \frac{\sin(\pi n x) \sin(\pi n x_0)}{ \pi^2 (n^2 + 1) } \sin(\pi x_0) dx_0  \right).
$$
Now, we define $v(x) = 2\int\limits_0^1 \sum\limits_{n=1}^{\infty} \frac{\sin(\pi n x) \sin(\pi n x_0)}{ \pi^2 (n^2 + 1) } \sin(\pi x_0) dx_0$, and we get $u(x, y) = v(x)\sin(\pi y)$.
Using the same technique, you can simplify summation and integral in expression of $v(x)$.
A: 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.
