Show that there exists a $c\in \mathbb{C}$ such that $f(z)=c \bar{z}$ for all $\vert z\vert=1$. The problem is:
 Suppose that $f(z)$ is continuous on a domain $D$ that contains the unit circle, and that $f(z)$ satisfies: $$\vert f(e^{i\theta})\vert \leq M \; \forall \theta \, \in [0, 2\pi )$$ and $$\bigg \vert \int _{\vert z \vert=1} f(z) \text{d}z \bigg \vert =2\pi M $$ show that there exists a $c\in \mathbb{C}$ such that $f(z)=c \bar{z}$ for all $\vert z\vert=1$.
I've tried lots of different approaches such as defining a function $g(z)=\frac{f(z)}{\bar{z}}$ and trying to show that $g'(z)=0$ so that $g$ is constant on the circle, or trying to use some bounding theorems for analytic functions to show that $g$ is constant but this requires $g$ to be analytic. Some other methods were using the Cauchy-Riemann equations but I couldn't find any reason why $g$ should be analytic. 
Any help would be greatly appreciated, thanks!
 A: The two conditions imply that $|f(z)|=M$ for all $|z|=1$, because if the inequality is strict on some $\theta$, then it will be so in an interval, and that prevents the equality in the integral (note that $2\pi M$ is an upper bound for the integral). 
So $f(e^{i\theta})=Me^{ig(\theta)}$ for some continuous $g$. Then
$$
\int_{|z|=1}f(z)dz=M\int_{0}^{2\pi}e^{ig(\theta)}\,ie^{i\theta}\,d\theta=iM\int_0^{2\pi}e^{i(\theta+g(\theta))}\,d\theta.
$$
So
$$
\left|\int_0^{2\pi}e^{i(\theta+g(\theta))}\,d\theta\right|=2\pi,
$$
and then
$$
2\pi=\int_0^{2\pi}e^{i(\theta+g(\theta)+d)}\,d\theta
$$
for an appropriate $d$. This last equality shows that the integral of the imaginary part is zero, and the integral of the real part is $2\pi$. If at any point the real part were less than $1$, we would not achieve the $2\pi$: we deduce that the real part of $e^{i(\theta+g(\theta)+d)}$ is $1$, which implies
$$
e^{i(\theta+g(\theta)+d)}=1
$$
for all $\theta$. This implies that $g(\theta)=2k(\theta)\pi-\theta-d$, and so 
$$
f(e^{i\theta})=Me^{-i\theta-id}=Me^{-id}\,e^{-i\theta},
$$
i.e.
$$
f(z)=c\overline z
$$
where $c=Me^{-id}$.
A: Unfortunately, my first attempt was incorrect because I messed up the equality case in the triangle inequality. I've corrected my argument, and left my first attempt below.

Current Solution

By the Triangle Inequality, $$2\pi M=\left|\int_{0}^{2\pi}f(e^{i\theta})e^{i\theta}\, d\theta\right|\leq\int_{0}^{2\pi}|f(e^{i\theta})|\, d\theta\leq 2\pi M\qquad (1)$$
  so in fact equality holds. Examining a proof of the triangle inequality (for instance Theorem 1.33 in Rudin's Real and Complex Analysis), we see that for equality to hold, there exists some constant $\alpha$ with $|\alpha|=1$ for which $$\arg[\alpha f(e^{i\theta})e^{i\theta}]\equiv 0\qquad(2)$$ [this is a consequence of the first $\leq$ in $(1)$]
As a consequence of the second $\leq$ in $(1)$, we have that $$|f(e^{i\theta})|=M\qquad(3)$$
  Combining $(2)$ and $(3)$, we see that $$\alpha f(e^{i\theta})e^{i\theta}=M$$
  whereupon $$f(z)=f(e^{i\theta})=\frac{M}{\alpha}e^{-i\theta}=c\bar{z}$$
  if we choose $c=\frac{M}{\alpha}$ $\square$


First Attempt

By the Triangle Inequality, $$2\pi M=\left|\int_{|z|=1}f(z)\, dz\right|\leq\int_{|z|=1}|f(z)|\, dz\leq 2\pi M$$
  so in fact equality holds in the triangle inequality. Thus, $|f(e^{i\theta})|=M$ and $f(e^{i\theta})$ has constant argument. So $f(z)=Me^{i\theta_0}$ for some constant angle $\theta_0$.
In particular, the statement you are trying to prove appears incorrect.

