Let $\Omega=[0,1]^2$ be the unit square and $a>0$.


1) I would like to know one estimate of the constant $C(a)$ such that
$$
\forall u\in W^{1,2}(\Omega)\quad \int\_\Omega u^2\le C(a)\int\_\Omega |\nabla u|^2,
$$  

under the weighted average and periodicity conditions
 $$
\int\_\Omega e^{-ay}u(x,y)\, dx dy=0,\qquad u(0,y)=u(1,y).
$$
Or, at least, a proof of existence.


2) How is the Euler-Lagrange equation of the associated variational problem? Is
$$
\Delta u+\lambda u+\mu e^{-az}=0,\quad \int\_\Omega u^2=1,\quad \int\_\Omega e^{-ay}u=0
$$
correct?



Poincaré inequality under weighted average condition
For $u\in W^{1, 2}(\Omega)$ set $L(u) = \int\_\Omega e^{-ay}u(x, y)dxdy$. We want to prove that if $L(u) = 0$ then $||u||\_{L^2}\le C||\nabla u||\_{L^2}$ for some universal constant $C$. We will first deal with the more interesting case $a \ge 1$ for simplicity.


Since $W^{1, 2}(\Omega)$ is a Hilbert space and $L$ is a continuous linear functional there exists $f\in W^{1, 2}(\Omega)$ such that $L(u) = \langle u, f\rangle\_{W^{1, 2}}$. First of all let us prove that $||f||\_{W^{1, 2}} \le \frac{C}{a}$. We have $||f||\_{W^{1, 2}} = \sup\_{||u||\_{W^{1, 2}} = 1} |\langle u, f\rangle|\_{W^{1, 2}}$.


$$\langle u, f\rangle\_{W^{1, 2}} = \int\_\Omega e^{-ay}u(x, y)dxdy = \int\_\Omega \frac{\partial u}{\partial y}(x, y)\frac{1}{a}e^{-ay}dxdy + \int\_0^1\frac{1}{a}u(x, 0)dx - \int\_0^1\frac{e^{-a}}{a}u(x, 1)dx.$$


From this (and the boundedness of the trace map) we can easily see that $|\langle u, f\rangle\_{W^{1, 2}}| \le \frac{C}{a}$ if $||u||\_{W^{1, 2}} = 1$. 


On the other hand we have $\langle 1, f\rangle\_{W^{1, 2}} = \int\_\Omega e^{-ay}dxdy = \frac{1-e^{-a}}{a} \ge \frac{1-e^{-1}}{a}$.


Let's expand everything into the eigenvectors of the Laplacian $v\_0 = 1, v\_1, v\_2, \ldots $ with eigenvalues $0 = \lambda\_0 < \lambda\_1 \le \lambda\_2 \le \ldots$(in our case they are sines and cosines but we do not need this). We normalize them so that $||v\_n||\_{L^2} = 1$.


Let $u = \sum\_{n = 0}^\infty a\_nv\_n$, $f = \sum\_{n = 0}^\infty b\_nv\_n$. We have $0 = \langle u, f\rangle\_{W^{1, 2}} = \sum\_{n = 0}^\infty (\lambda\_n + 1)a\_n \overline{b\_n}$. Therefore 


$$|a\_0| = |-\frac{1}{\overline{b\_0}} \sum\_{n = 1}^\infty (\lambda\_n + 1)a\_n\overline{b\_n}| \le \frac{1}{|b\_0|} \sqrt{\sum\_{n = 1}^\infty (\lambda\_n + 1)|a\_n|^2}\sqrt{\sum\_{n = 1}^\infty (\lambda\_n + 1)|b\_n|^2} \le C\frac{1}{|b\_0|}||\nabla u||\_{L^2} \*||f||\_{W^{1, 2}},$$


where in the first inequality we used Cauchy-Schwarz and in the second we used the standard Poincare inequality for the zero-mean function $u - a\_0$ (or the inequality $\frac{1+\lambda\_n}{\lambda\_n} \le \frac{1+\lambda\_1}{\lambda\_1} < \infty$).


Recall that $|b\_0| = |\langle 1, f\rangle\_{W^{1, 2}}| \ge \frac{c}{a}$ and $||f||\_{W^{1, 2}} \le \frac{C}{a}$. Therefore we get (denoting all constants and their product by $C$) that


$$|a\_0| \le C||\nabla u||\_{L^2}.$$


Therefore we have


$$||u||\_{L^2} = \sum\_{n = 0}^\infty |a\_n|^2 = |a\_0|^2 + \sum\_{n = 1}^\infty |a\_n|^2 \le C^2||\nabla u||^2\_{L^2} + C'||\nabla u||^2\_{L^2} = C\_1||\nabla u||^2\_{L^2},$$


where in the inequality step we used the above bound for $|a\_0|$ and once again standard Poincare inequality for $u-a\_0$. This is exactly what we want.


In the case $0 < a < 1$ we can see directly from the definition (without integration by parts) that $|\langle u, f\rangle\_{W^{1, 2}}| \le ||u||\_{L^2} \le ||u||\_{W^{1, 2}}$, therefore $||f||\_{W^{1, 2}}\le 1$. On the other hand $\langle 1, f\rangle\_{W^{1, 2}} = \frac{1-e^{-a}}{a} \ge c$ for some universal $c > 0$. The rest of the proof is exactly the same.


