Let $\Omega=[0,1]\times [0,1]$ be the square. We say a function $f\in H^1(\Omega)$ is periodic on $\Omega$ if $f(x,0)=f(x,1)$ and $f(0,y)=f(1,y)$ (in the sense of traces of course). Now consider the problem
$$\begin{cases}-\Delta u+au=f,\\ u,u\_x,u\_y\text{ are periodic on }\Omega.\end{cases} $$
It is easily seen that the variational formulation of the above equation is
$$(\nabla u,\nabla v)\_{L^2}+(u,v)\_{L^2}=(f,v)\_{L^2},\;\;\;\;\text{ for all } v\in H^1\_{per}(\Omega):=\{v\in H^1(\Omega):v\text{ is periodic on }\Omega\}. $$


* When $a>0$, we have the ideal situation where the solution operator $T\_a:f\mapsto u$ is well defined (Lax-Milgram on the Hilbert space $H^1\_{per}$), self-adjoint (since $(\nabla u,\nabla v)\_{L^2}+a(u,v)\_{L^2}$ is an inner product) and compact on $L^2(\Omega)$ (by Sobolev embeddings). Thus one can find a Hilbert basis for $L^2(\Omega)$ composed from eigenfunctions $\{\phi\_n\}$ of $T\_a$. Thus we have that $u=\sum\_n (\lambda\_n+a)^{-1}(f,\phi\_n)\_{L^2}\phi\_n$ where the $\lambda\_n$'s are the eigenvalues of $-\Delta$.
* When $a\leq 0$, we have two situations given by the Fredholm alternative applied to the inverse of the operator of $L\_\epsilon u=-\Delta u+au+\epsilon u$ (where $\epsilon$ is chosen so that the problem is coercive).
	1. If $-a$ is not an eigenvalue of $-\Delta$, then a unique solution $u$ exists for the given $f$. Thus we can also define a solution operator $T\_a:f\mapsto u$ which is not necessarily continuous from $L^2$ to $H^1$ (a priori). Do the eigenvalues of $T\_a$ still form a basis for $L^2(\Omega)$? If not how do we represent a solution in this case?
	2. When $-a$ is an eigenvalue, either we have no solutions or $f \perp V$ where $V$ is a subspace of dimension $n\in\mathbb{N}$. (I believe it's some eigenspace). How to represent solution in this case?



Representing solutions of $-\Delta u+au=f$ when $a\leq 0$
Take the eigenbasis $\phi\_n$ you exhibited for $a=0$. It is still an eigenbasis for $-\Delta + a$, with shifted eigenvalues $\lambda\_n + a$.
Write
$$
E\_a=\{n\in\mathbb N : \lambda\_n =- a\}, 
$$
which is either an empty set or a finite set. If $E\_a=\emptyset$ (case 1.) then
$$
u = \sum\_{n\in\mathbb N} \frac{1}{\lambda\_n + a} \langle\phi\_n,f\rangle \phi\_n, 
$$
and this sum is well defined. Note that only finitely many terms correspond to the case $\lambda\_n+a<0$, since $\lambda\_n\to\infty$.


If $E\_a\neq\emptyset$ (case 2.) note that if $\langle\phi\_n,f\rangle\neq0$ for some $n\in E\_a$, there isn't a solution, as an integration by parts against $\phi\_n$ will show.


If $\langle\phi\_n,f\rangle=0$ for all $n\in E\_a$, then any solution writes
$$
u=\sum\_{n\in E\_a} \alpha\_n \phi\_n + \sum\_{n\not\in E\_a} \frac{1}{\lambda\_n + a} \langle\phi\_n,f\rangle \phi\_n, 
$$
where the $\alpha\_n$ are arbitrary. So to obtain uniqueness, you need to set $\langle\phi\_n,u\rangle$ for all $n \in E\_a$. When $a=0$, there is a unique eigensolution, corresponding to $\lambda=0$, which is the constant eigensolution $\phi\_0=1$. So usually one sets $\langle\phi\_0,u\rangle=\int\_{[0,1]^2} u dxdy=0$ to ensure uniqueness (but you could choose another constant if you so wished).


