Suppose that $\Omega=[0,1]^2$. I will say that a real valued function $u$ on $\Omega$ satisfies periodic boundary values if $$u(x,0)=u(x,1), \;u(0,y)=u(1,y),\;\;\;\text{ for all }x,y\in[0,1].$$

Now let $f\in L^2(\Omega)$, and suppose that I want to look for a solution of the following problem $$ \begin{cases}-\Delta u+u=f, \;\;\text{ on }\Omega=(0,1)^2,\\ u,\; u_x,\text{ and }u_y\text{ satisfy periodic boundary values.}\end{cases}$$

The question is how to show existence (if possible) of $u$.

**My input to the problem:** The weak formulation of the problem with test space taken to be $$X=\{v\in H^1(\Omega):\text{ $v$ satisfies periodic boundary values}\},$$
is the same as the $H^1_0$ formulation, ie
$$a(u,v):=\int_\Omega\nabla u\cdot \nabla v+\int_\Omega uv =\int_\Omega fv=: F(v),\;\;\;\text{ for all }v\in X.$$
This is because the boundary integral vanishes due to $u_x$, $u_y$ and $v$ being in $X$. On the other hand, $X$ is a closed subspace of $H^1(\Omega)$ and therefore it is a Hilbert space with the $\|\cdot\|_{H^1}$ norm. I think we can use the Lax-Milgram theorem on $X$, because $a$ seems coercive on $X$, $a$ and $F$ are continuous on $X$.

However, the Lax-Milgram theorem gives uniqueness, which is weird because unlike $H^1_0(\Omega)$, the space $X$ does not exactly prescribe the boundary values (it just says that they are periodic). In any case, even if I do get the solution $u\in X$ and then by regularity $u\in X\cap H^2(\Omega)$, I should still show that $u_x$ and $u_y$ satisfy periodic boundary values, and this I don't know how to.