Maximize $u_x(0)$ for a harmonic function $u:D\rightarrow [0,1]$ If $u$ is a harmonic function from $D$ to $[0,1]$, where $D\subset\mathbb{R}^2$ is the open unit disk centered at $0$.  What is the maximum of $u_x(0)$?
My solution: first we assume that $U\supset\overline{D}$ is an open ball and $u:U\rightarrow[0,1]$ is harmonic on $U$, then there exists an analytic function $f:U\rightarrow\mathbb{C}$ such that $\text{Re }f=u$ on $U$. The Schwartz integral formula says $$f(z)=\int_0^{2\pi}u(\xi)\frac{\xi+z}{\xi-z}\frac{d\theta}{2\pi}+iK$$ if $z\in D$, where $\xi=e^{i\theta}$ and $K\in\mathbb{R}$ is a constant.
We differentiate this with respect to $z$,
$$f'(z)=\int_0^{2\pi}u(\xi)\frac{2\xi}{(\xi-z)^2}\frac{d\theta}{2\pi}.$$
Take $z=0$, we have $$f'(0)=\int_0^{2\pi}u(\xi)\frac{2}{\xi}\frac{d\theta}{2\pi}.$$
Hence $$u_x(0)=\int_0^{2\pi}u(e^{i\theta})\cos\theta\,\frac{d\theta}{\pi}.$$ Since $u(e^{i\theta})\in[0,1]$, the maximum of this integral is $\frac{2}{\pi}$.
If instead $u$ is a harmonic function from $D$ to $[0,1]$, then what we have shown implies that for any $r\in(0,1),$ we have $ru_x(0)\leq\frac{2}{\pi}$, therefore, $u_x(0)\leq\frac{2}{\pi}$. This maximum can be attained: simply stipulate that $u(e^{i\theta})=1$ if $\theta\in[-\pi/2,\pi/2]$ and $u(e^{i\theta})=0$ if $\theta\in(\pi/2,3\pi/2)$, then use the Poisson's formula with this boundary condition to find such $u$. Therefore, the maximum is $\frac{2}{\pi}$.
My question: is my solution correct and is there some way to do this without complex analysis? For example if we would like to generalize to $n$-dimensions. Thanks!
 A: I got the same answer you did, but I used the Poisson integral for the disc. Assuming, as you did at first, that $u$ is harmonic in $D(0,r)$ for some $r>1,$ we have, for $z\in D(0,1),$
$$u(z)=\frac{1}{2\pi}\int_{-\pi}^\pi u(e^{it})(1-|z|^2)(|e^{it}-z|^2)^{-1}\, dt.$$
If $z=x\in (-1,1),$ this becomes
$$u(x)=\frac{1}{2\pi}\int_{-\pi}^\pi u(e^{it})(1-x^2)(|e^{it}-x|^2)^{-1}\, dt.$$
Now differentiate with respect to $x$ through the integral sign with respect to $x$ and set $x=0.$ We get
$$u_x(0) = \frac{1}{2\pi}\int_{-\pi}^\pi u(e^{it})2\cos t\, dt.$$
This is what you had, and thus $2/\pi$ is the desired maximum value of $u_x(0).$
We can do the same in higher dimensions. The Poisson kernel for the unit ball in $\mathbb R^n$ is
$$P(x,\zeta) = (1-|x|^2)(|\zeta - x|^2)^{-n/2}.$$
Here $\zeta \in S,$ the unit sphere, and $x\in B,$ the unit ball, with $x=(x_1,\dots,x_n).$ Thus if we are interested in $u_{x_1}(0),$ we let $x=(x_1,0,\dots, 0)$ in the above to get
$$(1-x_1^2)(|\zeta -(x_1,0,\dots, 0) |^2)^{-n/2}.$$
Differentiate that with respect to $x_1,$ then set $x=(0,\dots,0).$ We get
$$u_{x_1}(0) = \frac{1}{\sigma(S)}\int_S u(\zeta)n\zeta_1\,d\sigma(\zeta).$$
($\sigma$ is surface area measure on $S.$) As in the case $n=2,$ the maximum value will occur with $u(\zeta) = \chi_{S+},$ where $S+=\{\zeta \in S: \zeta_1>0\}.$ That maximal value is, I think,
$$\tag 1\frac{V_{n-1}(B_{n-1})}{V_n(B_n)},$$
where $V_k$ is Lebesgue volume measure on $\mathbb R^k$ and $B_k$ is the corresponding unit ball. Note that $(1)$ checks out with our work in the $n=2$ case.
Check out the book Harmonic Function Theory, p. 123, where the authors discuss the Schwarz Lemma for harmonic functions: http://www.axler.net/HFT.pdf
