consequences of Schwarz lemma of holomorphic functions of unit disk Let $D$ be the open unit disk centered at $0$ in the complex plane. Let $f:D\longrightarrow D$ be holomorphic such that $f(0)=0$. Use the Schwarz lemma to prove that $|f(z)+f(-z)|\leq 2|z|^2$ for any $z\in D$. If the equality holds for some $z_0\in D\{0\}$, then there exists $\theta\in \mathbb{R}$ such that $f(z)=e^{i\theta} z^2$.
I let $g(z)=(f(z)+f(-z))/2$. Applying Schwarz lemma on $g$, I obtain $|g(z)|\leq |z|$. i.e., $|f(z)+f(-z)|\leq 2|z|^2$. If the equality holds, then $g(z)=e^{i\theta}z$. Thus $f(z)+f(-z)=2e^{i\theta}z^2$ for all $z\in D(0,1)$. But I do not know how to obtain  $f(z)=e^{i\theta} z^2$... How to continue?
Thank you a lot.

The fact that we expect $|z|^2$ as a bound suggests that the linear term should not be present in $f(z)+f(-z)$. And it's not, because writing $f(z) = \sum_{n=1}^\infty c_n z^n$ (no constant term since $f(0)=0$), we get 
$$f(z) +f(-z) = \sum_{n=1}^\infty c_n z^n +\sum_{n=1}^\infty c_n (-1)^n z^n = 2\sum_{k=1}^\infty c_{2k} z^{2k}   $$
Letting 
$$g(z) = \frac{f(z) + f(-z)}{2z} =    \sum_{k=1}^\infty c_{2k} z^{2k-1}$$
we see that $g(0)=0$. It remains to justify that $|g(z)|\le 1$ and apply the Schwarz lemma to $g$, concluding with the result. 
To this end, fix $z\in D$, choose $r$ so that $|z|<r<1$, note that $|g(z)|\le 1/r$ when $|z|=r$; and conclude by the maximum principle that $|g(z)|\le 1/r$. Since $r$ can be arbitrarily close to $1$, it follows that $|g(z)|\le 1$.
