The estimate of real and imaginary part of a holomorphic function Let $f$ be holomorphic in the unit disk $D(0,1)$, and $f(0)=0$. Suppose $|\Re f(z)|\leq 1$ for all $|z|<1$. Show that 
$$|\Re f(z)|\leq\frac{4}{\pi}\arctan|z|;$$
$$|\Im f(z)|\leq \frac{2}{\pi}\ln\frac{1+|z|}{1-|z|}.$$
What I could do is just to observe that
$$\frac{e^{i\frac{\pi}{2}f(z)}-1}{e^{i\frac{\pi}{2}f(z)}+1}:D(0,1)\to D(0,1)$$ with $0$ being fixed. And Schwarz lemma applies. However, I could not get any information on the real and imaginary part of $f$.
 A: What you have by the Schwarz lemma is
$$\left\lvert \tan\left(\frac{\pi}{4}f(z)\right)\right\rvert \leqslant \lvert z\rvert.$$
Writing $w = h(z) = \tan \left(\frac{\pi}{4}f(z)\right)$, what you want is
$$\bigl\lvert \Re \arctan w\bigr\rvert \leqslant \arctan \lvert w\rvert\tag{1}.$$
Since $\lvert w\rvert \leqslant \lvert z\rvert$, by the monotonicity of the real arcus tangent, the bound for $\Re f$ follows from $(1)$. The most difficult part is seeing that $(1)$ is what you need.
To obtain $(1)$, we look at the explicit formula for $\arctan$,
$$\arctan w = \frac{1}{2i} \log \frac{1+iw}{1-iw}.\tag{2}$$
The real part of $\arctan w$ is thus half the argument of $\frac{1+iw}{1-iw}$, and to achieve $(1)$, we must see what the maximal argument of that is on the circle $\lvert w\rvert = r < 1$. Just plugging a few points of the circle into the Möbius transformation shows that the image of $\lvert w\rvert = r$ is
$$\left\lvert \zeta - \frac{1+r^2}{1-r^2}\right\rvert = \frac{2r}{1-r^2},$$
and that circle intersects the unit circle at right angles, so the maximal argument is
$$\arctan \frac{2r}{1-r^2} = \arctan \left(\tan (2\arctan r)\right) = 2\arctan r,$$
which by symmetry (with respect to conjugation) is just $(1)$. So we have seen
$$\left\lvert \Re \left(\frac{\pi}{4}f(z)\right)\right\rvert \leqslant \arctan \left\lvert \tan\left( \frac{\pi}{4}f(z)\right)\right\rvert \leqslant \arctan \lvert z\rvert.$$
Multiply with $\frac{4}{\pi}$ to get the listed form.
The bound for the imaginary part is quite analogous to obtain, one needs the maximal modulus of
$$\frac{1+iw}{1-iw}$$
on $\lvert w\rvert = r$. I leave that to the reader.
