Showing that $f(z)$ is a constant function in the open ball $B(0;2)$ Let $f(z)$ be an analytic function in the open ball $B(0;2)$. Show that if $f(z)$ is imaginary $\forall z\in C(0;1)$ (a circle centered at $0$ of radius $1$), then $f(z)$ is a constant function in $B(0;2)$.
In this question there is a hint to consider the function $g(z)=e^{f(z)}$.
I thought of applying the maximum modulus principle, but I am clueless as to how I can do so.. Also, how does the hint help in any way in approaching this problem?
 A: We can define holomorphic
$$ h(z)=-\overline{f(1/ \overline z)}$$
on $\Bbb C\setminus \overline{B(0;1/2)}$. Then $f$ and $h$ coincide on $C(0;1)$, henc coincide on the annular intersection of their domains, hence together define an entire function. This is bounded, hence constant.
A: For $r > 0$, let $C(0;r)$ denote the circle of radius $r$, centered at $0$, i.e., $C(0;r)=\{z\in\mathbb{C}\,\colon |z|=r\}$.

As in the hint provided, let $g(z)=e^{f(z)}$.

Then $g$ is analytic and nonzero on $B(0;2)$, hence by the Maximum Modulus Principle, the maximum and minimum values of $|g|$ on $B[0;1]$ occur on $C(0;1)$.

But on $C(0;1)$, we have $|g|=1$ (since $f(z)$ is imaginary for all $z\in C(0;1)$), hence on $B[0,1]$, the minimum and maximum values of $|g|$ are both equal to $1$.

It follows that $|g|=1$ on $B[0,1]$, hence $|g|=1$ on $B(0;1)$.

By the Maximum Modulus Principle, since $|g|=1$ on $B(0;1)$, it follows that $g$ is constant on $B(0;1)$.

Since $g$ is constant on $B(0;1)$, and analytic on $B(0;2)$, it follows that $g$ is constant on $B(0;2)$

Thus, we have  $g=c$, for some $c\in \mathbb{C}$ with $|c|=1$.

Let $c=e^{i\theta}$, for some $\theta\in\mathbb{R}$.

Then we have $e^{f(z)}=e^{i\theta}$, for all $z\in B(0;2)$.

It follows that the range of $f$ is a subset of $\{i(\theta + 2n\pi)\mid n\in \mathbb{Z}\}$, which is a countable set.

For each $r\in (0,2)$, let $M_r$ be the maximum value of $|f|$ on $C(0;r)$.

If $f$ was non-constant on $B(0;2)$, then by the Maximum Modulus Principle, $M_r$ would be a strictly increasing function of $r$, so the set $\{M_r\mid r\in (0,2)\}$ would be uncountable, but then the range of $f$ would also be uncountable, contradiction.

It follows that $f$ is constant on $B(0;2)$, as was to be shown.
A: Here is another solution.
Let $f(z) =: u(z) + iv(z)$ in $B(0, 2)$ be the decomposition into real and imaginary parts. Since $f$ is analytic, $u$ and $v$ are harmonic in $B(0, 2)$. In particular, $u$ is identically zero in $B(0, 1)$. Thus it is identically zero in $\overline{B\left(0, \frac{1}{2}\right)}$, a nonempty compact subset of $B(0, 2)$. By the Identity Principle of Harmonic Real-Valued Functions $u$ is identically zero in $B(0, 2)$ (we can site this theorem since $B(0, 2)$ is an open connected subset of the complex plane)
Now, by the Cauchy-Riemann Equations, 
$$\frac{\partial v}{\partial x} = -\frac{\partial u}{\partial y} = 0$$
$$\frac{\partial v}{\partial y} = \frac{\partial u}{\partial x} = 0$$
everywhere in $B(0, 2)$; thus $v$ is a constant in $B(0, 2)$, and so is $f$. $\square$
