Finding an unbounded harmonic function with prescribed boundary values I'm doing a practice problem on complex analysis taken from the qualifying exam of U of Washington and this question got me stuck for hours now:
Part 1: find a bounded real valued function $u$ that is continuous on $\{z\in\mathbb{C}|z\not=\pm1,\text{Im }z\geq 0,|z|\leq 1\}$ and harmonic on $\{z\in\mathbb{C}|\text{Im }z>0,|z|<1\}$ and $u(z)=3$ if $z\in(-1,1)$ and $u(z)=1$ if $|z|=1$, $\text{Im }z>0$.
Part 2: find an unbounded function with the same property.
The first part is easy, it is the imaginary part of $$\frac{4}{\pi}\log\bigg(\frac{1}{i}\frac{z-1}{z+1}\bigg)+i,$$ where the imaginary part of the log here is taken in $[0,2\pi).$ More explicitly, $$u(x,y)=\frac{4}{\pi}\arctan\frac{1-x^2-y^2}{2y}+1.$$ Here $\arctan$ is taken to be a function from $[0,\infty]$ to $[0,\pi/2]$.
But I have some trouble with the second part. I couldn't find an unbounded harmonic function with the same property. Can someone please help me? Thanks!
There is a similar question here: but I do not understand why we can consider the function $z\mapsto-\frac{1}{2}(z+z^{-1})$ given there. It doesn't look right to me.

In order to solve part 2 it suffices to find a harmonic function $u$ in
$D = \{z \in \Bbb C \mid \operatorname{Im} z > 0,|z|<1\}$ which is continuous and equal to zero on $A = \overline D \setminus \{ -1, 1 \}$ and unbounded.
The function $f(z) = \left( \frac{z-1}{z+1} \right)^2$ maps $D$ conformally onto the lower half-plane and extends continuously to $A$, mapping the segment $(-1,1)$ and the upper half-circle to the positive and negative real axis, respectively.
$v(z) = \operatorname{Im}(z)$ is harmonic and unbounded in the lower half-plane, with boundary values zero except at $z=\infty$. Therefore
$$
 u(z) = \operatorname{Im}\left( \frac{z-1}{z+1} \right)^2
$$
has the desired properties.
