# Boundary behavior of harmonic function on the square

Is there a constant $C$ such that if $u:[0,1]^2\to \mathbb{R}$ is harmonic with $u\in L^\infty(\partial [0,1]^2)$ (if you prefer you can also assume $\|u\|_\infty = 1$ on the boundary and $u$ smooth on the part of the boundary where $y>0$) one has:

$$\left| \int_0^{1/2}u(t,0)dt-\int_{1/2}^1u(t,0)dt \right| \le C\int_{[0,1]^4}|u(x_1,y_1)-u(x_2,y_2)|\,dx_1dx_2dy_1dy_2?$$ As a statistician, I look at the left-hand side as a Haar-wavelet coefficient and at the right hand side as an $l^1$-measure of the variance of the distribution $u$.

I have looked at some PDE books and notes but nothing similar popped out. For harmonic functions on $[0,1]$ this works (you want to bound $|u(0)-u(1)|$ from above) just because $u$ is linear.

No. Take $$u(x,y) = \pi^{-1} \arctan \frac{a - x^2 + y^2}{2 x y} + \pi^{-1} \arctan \frac{x^2 - y^2}{2 x y} ,$$ a function that is harmonic in the first quadrant with boundary value $0$ everywhere except on $[0, a] \times \{0\}$, where it is one. For $a < 1/2$, the left-hand side of your conjectured inequality is $a$. To estimate the right-hand side, observe that $u$ is bounded by $1$ and when $x^2 + y^2 < (2 a)^2$ and by $C_1 a^2 / (x^2 + y^2)$ when $x^2 + y^2 \geqslant (2 a)^2$. (The latter bound is rather technical, it follows from the expression for $\tan(\alpha+\beta$) and the Taylor series expansion of $\arctan$). This implies that the $L^1$ norm of $u$ on the unit square does not exceed $$(\pi a^2) + C_1 a^2 \iint_{\{(2 a)^2 < x^2 + y^2 < 2\}} \frac{1}{x^2+y^2} dxdy \le C_2 a^2 \log(1/a) ,$$ and so the right-hand side of your integral is bounded above by $C_3 a^2 \log(1/a)$. And there is no constant $C$ such that $a \leqslant C \cdot C_3 a^2 \log(1/a)$ for all $a \in (0, 1/2)$.