Estimate $|f’(0)|$ by $Re(f(z))$ If $f$ is holomorphic in unit disk $B$, $f(0)=0$, and $|\operatorname{Re} f(z) |\leq A$ for $A>0$, prove that $|f’(0)|\leq 4A/\pi$.
Define $g(z)=\frac{f(z)}{f(z)-2A}$, then I can use Schwarz lemma to prove $|f’(0)|\leq 2A$, but it seems to be invalid for the sharper constant. Any help will be appreciated.
 A: One uses the Poisson-Cauchy representation here (as per comment below Wikipedia has this as Schwarz formula though it is just the Cauchy completion of the Poisson representation so for example in Duren, $H^p$ spaces it appears as above). Wlog we can assume $f$ extends to the boundary as otherwise, we use the usual $f(rz), r \to 1$ method, so using that $f(0)$ real, we get (otherwise there would be an $+ic$):
$f(z)=\frac{1}{2\pi}\int_0^{2\pi}{\Re f(e^{it})\frac{e^{it}+z}{e^{it}-z}}dt$
Taking the derivative in $z$ and then putting $z=0$ we get:
$f'(0)=\frac{1}{2\pi}\int_0^{2\pi}{2\Re f(e^{it})e^{-it}}dt$
Now we use the full power of the hypothesis $f(0)=0$ (we used so far only that $0$ is real) to notice that:
$0=\frac{1}{2\pi}\int_0^{2\pi}{2\Re f(e^{it})}dt$
Subtracting, taking absolute values and using that $|1-e^{-it}|=2\sin{\frac{t}{2}} \ge 0$(!), we get:
$|f'(0)| \le \frac{1}{2\pi}\int_0^{2\pi}{4A\sin{\frac{t}{2}}}dt=\frac{4A}{\pi}$, so we are done!
A: It is correct that $g(z)=\frac{f(z)}{f(z)-2A}$ satisfies the conditions of the Schwarz lemma, but the image is a strict subset of the unit disk, and that's why you did not get the optimal bound.

In order to determine the best possible bound for $|f'(0)|$ we need to compose $f$ with the conformal mapping from the strip $|\operatorname{Re} w|<A$ onto the unit disk. The condition $f(0) = 0$ is not needed.
For simplicity assume that $A=1$, otherwise consider the function $f/A$ instead. We can also assume that $|\operatorname{Re}f(z)|<1$ because equality at one point in the unit disk would imply that the function is constant.
Now
$$
 \tan \left(\frac \pi 4 w\right) = -i\frac{e^{i\pi w/2}-1}{e^{i\pi w/2}+1}
$$
maps the strip $|\operatorname{Re} w|<1$ conformally to the unit disk. It follows that
$$
 g(z) = \tan\left(\frac \pi 4 f(z)\right) 
$$
maps the unit disk into itself, so that the  Schwarz–Pick theorem can be applied to $g$ at $z=0$. It follows that
$$
 1 - |g(z)|^2 \ge |g'(0)| = \left| \frac{\frac \pi 4 f'(0)}{1 + \tan^2\left(\frac \pi 4 f(0)\right)} \right| = \frac \pi 4 |f'(0)| \, .
$$
i.e. $ |f'(0)| \le \frac 4 \pi (1 - |g(z)|^2) \le \frac 4 \pi$.
This also shows that the estimate is sharp, equality holds for
$$
 f(z) = \frac 4 \pi \arctan(\lambda z)
$$
with $\lambda \in \Bbb C$, $|\lambda| = 1$.
