Here is the question I am trying to solve:
Let $f$ be an entire function and suppose $|f(z)| = |z|$ for $|z| < 1.$ Prove that $f(z) = \lambda z$ for some $\lambda \in \mathbb C$ with $|\lambda = 1.|$
And a solution is given in the following link:
Prove that an entire function $f$ is of the form $f(z)=\lambda z$, where $|\lambda| =1$
I am pasting it below:
Let's use nothing special.
With $f$ entire, suppose $U\subset\Bbb C$ is open and $|f(z)|=|z|$ for all $z\in U$. For $0\ne z_0\in U$, write $$ f(z_0+h)=uz_0+\lambda h + h^2g(h)$$ where $u=\frac{f(z_0)}{z_0}\in S^1$, $\lambda =f'(z_0)$, and $g$ is continuous and therefore bounded in a neighbourhood of $z_0$. Let $h=tz_0$ with $t\in(-1,1)$. Then $$\begin{align}(1+t)|z_0|&=|z_0+h| \\&=|f(z_0+h)|\\&=|uz_0+\lambda tz_0+t^2z_0^2g(h)|\\&\approx |u_0+\lambda t||z_0|\\&=\left|1+\frac\lambda ut\right||z_0|\end{align}$$ (where "$\approx$" means "up to $O(t^2)$"). This is possible only when $\lambda=u$.
This means $f(z)=zf'(z)$ for all $z\in U$, so $$(\ln f(z))'=\frac{f'(z)}{f(z)}=\frac 1z=(\ln z)'$$ $$\ln f(z)=\ln z+\textit{const} $$ $$\tag1 f(z)= z\cdot\textit{const} $$ and the last constant is clearly of modulus $1$.
As $f$ is entire, $(1)$ must hold throughout.
Here are my questions:
1- What is the intuition behind defining $f$ like this $ f(z_0+h)=uz_0+\lambda h + h^2g(h)$?
2- I do not understand what exactly the author of the solution is trying to do to prove the required, can someone tell me the general idea?
1 - Every function that is holomorphic on an open disc has a convergent Taylor series. This is a theorem. What you have written is just the second-order approximation of the Taylor series.
2 - What is it to be holomorphic? Locally, a holomorphic function looks like a linear function from a small piece of the complex plane to another small piece of the complex plane. In other words, $f(z_0+h)\approx f(z_0)+f'(z_0)h$. The latter is off by a value that is much smaller than $h$.
Now draw the complex plane on a piece of paper, and draw a circle for $|z|=R$. Put two points on the circle, one for $z_0$ and the other for $f(z_0)$. Remember, they have the same absolute value, so they belong to the same circle. Draw an arrow stretching from $z_0$ to $z_0+h$, where $h$ points out from the circle in the radial direction.
Now, before you conclusively draw another arrow from $f(z_0)$ to $f(z_0)+f'(z_0)h$,
ask yourself how long the arrow will be and in which direction it will point. Remember, you're supposed to have $|f(z_0)+f'(z_0)h|\approx|z_0+h|$.
It will be pretty clear that if $f'(z_0)$ is chosen such that this arrow on which you're now deciding also points radially out of the circle, and has the same length has the first arrow you draw, then the approximation $|f(z_0)+f'(z_0)h|\approx|z_0+h|$ works swimmingly!
Let's focus on this value of $f'(z_0)$ and try to find it. We said that $h$ is a small positive real multiple of $z_0$. In other words, $h=tz_0$, where $t$ is a positive real number. We also want $f'(z_0)h=tf(z_0)$. Check that this indeed has the same length as $h$. Dividing the second equation by the first, you get $f'(z_0)=\frac{f(z_0)}{z_0}$.
Now, find a way to convince yourself that if $f'(z_0)$ is chosen to be any other value, and if you're allowed to vary the length of the arrow from $z$ to $z+h$ without necessarily changing the direction of this arrow, then the approximation no longer works. The formalisation of this idea is the very proof that you pasted in your answer.