Function holomorphic in the units disk with different bound Suppose $f$ is continuous in the closed unit disk $\bar{D}(0,1)$ and holomorphic over its interior $D(0,1)$. Moreover suppose that for $|z|=1$ we have:
$\Re(z)\leq0\Rightarrow |f(z)|\leq\ 1$
$\Re(z)>0\Rightarrow |f(z)|\leq 2$
and I Need to prove $|f(0)|\leq \sqrt{2}$ I know from the maximum modulus principle we have that:
$$1\leq \max_{|z|=1}|f|=\max_{\bar{D}(0,1)}|f|\leq 2$$
but I can't really see where the square root come from so I cannot go any further.
 A: First try. By Cauchy integral
$$f(0) = \frac{1}{2\pi i} \int_{\lvert z\rvert = 1} \frac{f(z)}{z}\,dz
=\frac{1}{2\pi} \int_0^{2\pi} f(e^{i\varphi})\,d\varphi.$$
Hence
$$|f(0)|\leq \frac{1}{2\pi} \int_0^{2\pi} |f(e^{i\varphi})|\,d\varphi\leq\frac{2\pi+1\pi}{2\pi}=\frac{3}{2}.$$
But unfortunately $\sqrt{2}<3/2$.
Second try. Consider the function $F(z)=f(z)f(−z)$ which is continuous in the closed unit disk $\bar{D}(0,1)$ and holomorphic over its interior $D(0,1)$. Then, $\text{Re}(z)\leq 0$ iff $\text{Re}(-z)\geq 0$ and therefore, for $|z|=1$ we have that
$$|F(z)|\leq |f(z)||f(−z)|\leq 2\cdot 1.$$
Now apply the Cauchy integral to $F$:
$$|f(0)|^2=|F(0)|\leq \frac{1}{2\pi} \int_0^{2\pi} |F(e^{i\varphi})|\,d\varphi\leq 2\implies |f(0)|\leq \sqrt{2}.$$
A: For a slightly different proof than the one RobertZ gave, note that $\log\lvert f\rvert\colon\overline{D}\to\bar{\mathbb{R}}$ is subharmonic (it is actually harmonic with poles), since it is $\Re\log f$ away from the zeros of $f$, and if $f(z)=0$ then $\log\lvert f(z)\rvert=-\infty$.  Now the mean value property of harmonic function gives $\log\lvert f(0)\rvert$ is at most the average value of $\log\lvert f\rvert$ on the unit circle, and the latter is bounded by $\frac12\log 2$.
