TITLE: Continuous function on the unit circle must be $c\bar{z}$
QUESTION [6 upvotes]: This is a homework problem, so hints or rough outlines are strongly preferred to a full solution.
Problem. Let $C$ be the unit circle.  Suppose the continuous function $f : C \rightarrow \mathbb{C}$ on the unit circle satisfies $|f(z)| \leq M$ and $\left|\int_{C} f(z)\;dz\right| = 2\pi M$.  Show that $f(z) = c\bar{z}$ for some constant $c$ with modulus $|c| = M$.
I've been able to argue $|f(z)| = M$ for all $z \in C$ by assuming this is not the case and finding a contradiction using continuity, the given identity, and the $ML$-inequality.  This is clearly necessary, but may not be useful to solve the problem.

REPLY [4 votes]: Your observation that $|f(z)|=M$ is useful. From the equality we get, if $z=e^{it}$,
$$
f(z)=M\,e^{ig(t)},\quad g\in C([0,2\,\pi],\mathbb{R}),\quad g(0)=g(2\,\pi)\pmod {2\,\pi}
$$
and $$
\int_0^{2\pi}e^{ig(t)}e^{it}\,dt=2\,\pi\,e^{i\alpha}
$$
for some $\alpha\in[0,2\,\pi)$. From this
$$
\Re(e^{-i\alpha}\int_0^{2\pi}e^{ig(t)}e^{it}\,dt)=\int_0^{2\pi}\Re(e^{i(g(t)+t-\alpha)})\,dt=2\,\pi.
$$
Deduce that
$$
\Re(e^{i(g(t)+t-\alpha)})=1\quad \forall t
$$
and that $g(t)+t-\alpha=0$ for all $t$. I hope I have not given too much detail.