Poincaré inequality under weighted average condition 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?
 A: 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.
