Laplace equation with periodic boundary conditions

I remember answering a similar question not long ago: Constants in Laplace's equation for a cube.

Let's make the problem more structure-revealing by scaling $\Omega$ to $[0,\pi]^2$. Without considering any boundary condition, using separation of variables: $u(x,y) = X(x)Y(y)$ leads you to: $$ X'' - \lambda X = 0,\quad\text{and}\quad Y'' + \lambda Y = 0.\tag{1} $$ If $\lambda = \omega^2 >0$ (could be the other way, or $0$ but that is the trivial case where solution is spanned by $\{1,x,y,xy\}$ and you can't have periodic boundary conditions), then solving (1) leads to $$ u(x,y) = \sum_{\omega\in A} c_{\omega}(a_1 e^{-\omega x} + a_2 e^{\omega x})\big(b_1 \cos (\omega y) + b_2 \sin (\omega y)\big), \tag{2} $$ Let's restrict $A$ as $\mathbb{N}$ for now if this choice can generate all functions in the solution space we need. Now onto boundary condition, basically we want to use the boundary condition to pin down $a_1,a_2,b_1,b_2$ (they depend on $\omega$ as well), and $c_{\omega}$: $$ u(x,0) = u(x,\pi),\quad\text{and}\quad u(0,y) = u(\pi,y). $$ First one gives: $$ \sum_{\omega\in A} c_{\omega}(a_1 e^{-\omega x} + a_2 e^{\omega x}) b_1 = -\sum_{\omega\in A} c_{\omega}(a_1 e^{-\omega x} + a_2 e^{\omega x}) b_1, $$ which drives $b_1 = 0$. The second one gives: $$\sum_{\omega\in A} c_{\omega}(a_1 + a_2 )b_2 \sin (\omega y) = \sum_{\omega\in A} c_{\omega}(a_1 e^{-\omega \pi} + a_2 e^{\omega \pi})b_2 \sin (\omega y).$$ This is where things get rather vague, if you just define $u(0,y) = u(\pi,y)$, not that they both equal to some specific function, we can't find all those coefficients.


Now onto answering your question, we can't say the family of solutions to this problem is unique up to a constant, for we have two families of solution! Other than (2), we can set $\lambda = -\omega^2<0$ and get the other familiy: $$ u(x,y) = \sum_{\omega\in A} c_{\omega}\big(a_1 \cos (\omega x) + a_2 \sin (\omega x)\big)(b_1 e^{-\omega y} + b_2 e^{\omega y}), \tag{3} $$ where family (2) corresponds to boundary condition $u(x,0) = u(x,\pi) = 0$, and family (3) corresponds to boundary condition $u(0,y) = u(\pi,y) = 0$.

Solution in family (3) can't be a constant plus a solution in family (2). Just think a plane sinusoidal wave traveling along $x$-axis, adding a constant is shifting up or down, we can't make it a plane sinusoidal wave traveling along $y$-axis.

And even for solution in the same family we can't do that! Think of the infinite superposition of different frequency of sinusoidal waves along one same direction: say we set $u(x,0) = u(x,\pi) = 0$, $u(0,y) = u(\pi,y) = g(y)$, and absorb $c$ into $a_1$ and $a_2$: $$ u(x,y) = \sum_{\omega\in A} (a_1 e^{-\omega x} + a_2 e^{\omega x}) \sin (\omega y),\tag{$\dagger$} $$ the second boundary condition leads to: $$ \sum_{\omega\in A} (a_1 + a_2 ) \sin (\omega y) = \sum_{\omega\in A} (a_1 e^{-\omega \pi} + a_2 e^{\omega \pi}) \sin (\omega y) = g(y), $$ for permissible $g$ whose Fourier expansion only has sine terms. Multiplying above for a specific frequency $\sin (\omega_0 y)$ and integrating on $[0,\pi]$ gives: $$ \int^{\pi}_0 g(y)\sin (\omega_0 y) \,dy=\int^{\pi}_0 (a_1 + a_2 ) \sin^2 (\omega_0 y) \,dy= \int^{\pi}_0 (a_1 e^{-\omega_0\pi} + a_2 e^{\omega_0 \pi}) \sin^2 (\omega_0 y)\,dy, $$ which is: $$ \int^{\pi}_0 g(y)\sin (\omega_0 y) \,dy = \frac{\pi}{2} (a_1 + a_2 ) = \frac{\pi}{2} (a_1 e^{-\omega_0\pi} + a_2 e^{\omega_0\pi}). $$ Solving above yields: $$ \begin{gathered} a_1 = \frac{2(e^{\omega_0\pi}-1)}{\pi(e^{\omega_0\pi} - e^{-\omega_0\pi})}\int^{\pi}_0 g(y)\sin (\omega_0 y) \,dy, \\ a_2 = \frac{2(1-e^{-\omega_0\pi})}{\pi(e^{\omega_0\pi} - e^{-\omega_0\pi})}\int^{\pi}_0 g(y)\sin (\omega_0 y) \,dy. \end{gathered}\tag{$\ddagger$} $$ We can see by this coefficient relation, if we add another permissible $h(y)$ to $g(y)$, it won't produce a solution adding a constant. Some coefficients, different for each frequency $\omega_0$, are added to the original coefficients of the $ (a_1 e^{-\omega x} + a_2 e^{\omega x})$ based on $g(y)$. Really this does not differ from the solution based on boundary condition $g(y)$ by a constant.

Last remark: even if we just add another constant to $g(y)$, we can't say the new solution only differs from the old solution by a constant.

A simple example is that if firstly we have $u(x,0) = u(x,\pi) = 0$, and $u(0,y) = u(\pi,y) = 1$, we have a solution $u_1(x,y)$, then we add 1 to the boundary condition $u(0,y) = u(\pi,y) = 1$, by $(\dagger)$ and $(\ddagger)$, the solution $u_2(x,y) = 2u_1(x,y)$, doubling the amplitude rather than differing by a constant.

If we add a constant to both boundary conditions, I believe we get a shift up or down, i.e., $u_2 = u_1 +C$.