When does $\lim_{z\to a}f(z)$ exist when $\lim_{z\to a}|f(z)|=L'$? The following is an excerpt from Silverman's Complex variables with applications discussing the question in the title. However, I don't understand the bolded parts.
If $\lim_{z \to a}f(z)=L$, then for a given $\epsilon \gt 0$ there exists $\delta \gt 0$ such that $$||f(z)|-|L||\le |f(z)-L| \lt \epsilon \, \text{whenever}\, 0\lt|z-a|\lt \delta$$
and therefore, $$\lim_{z\to a}|f(z)|=|L|$$
Clearly, if $L=0$, $\lim_{z\to a}|f(z)|=|L|$ iff $\lim_{z\to a}f(z)=L$. What happens if $L \neq 0?$ More precisely, if $\lim_{z\to a}|f(z)|=L'$, then is it always the case that $\lim_{z\to a}f(z)$ exists? Remember that if $\lim_{z\to a}f(z)=L$, then $|L|=L'$ and therefore, we have to examine when equality holds in $$||f(z)|-L'|=||f(z)|-|L||\le |f(z)-L|.$$
Equality would imply that $$Re(f(z)\bar{L})=|f(z)||L| \, \text{or} \, |f(z)|=Re(f(z)\frac{\bar{L}}{|L|})=Re(e^{i\theta}f(z))$$ where $\theta=Arg(\bar{L}/|L|)$, or equivalently, 
$$|e^{i\theta}f(z)|=Re(e^{i\theta}f(z))$$
so that $e^{i\theta}f(z)$ is real and nonnegative which is impossible for a general complex-valued function $f(z)$. However, this is possible when $f(z)=L'$ or $f(z)$ is a real-valued function with constant sign.
Firstly, I don't see why we have to examine when equality holds in $||f(z)|-L'|=||f(z)|-|L||\le |f(z)-L|.$ What does this have to do with the existence of the limit of $f(z)$ at $a$? 
Next, in the second bolded part, why does the equality imply that equation?
Finally, I don't understand the final statement. I see that $e^{i\theta}f(z)$ must be real because the modulus of the value depends solely on the real part, i.e. the modulus of the imaginary part is zero. And since the real part is nonnegative, the value must be real and nonnegative. But why is this only possible in the mentioned case? How can I geometrically interpret this result?
I would greatly appreciate it if anyone could explain the above questions to me.
 A: The author is seeking a sufficient condition under which $\lim_{z\to a}|f(z)|=L'$ implies that $\lim_{z\to a}f(z)$ exists.  
The first statement "we have to examine when equality holds in $||f(z)|−L ′ |=||f(z)|−|L||≤|f(z)−L|$" is rather strong.
While equality does lead to a sufficient condition, it does not lead to a necessary one.  And that is, perhaps, the source of your question here.
Now, let's work on the "Equality would imply that" part next.
Take the square of both sides of the equation $||f| - |L|| = |f - L|$.
The LHS is $|f|^2 - 2|f||L| + |L|^2$
The RHS is 
$$|f|^2 - 2\text{Re}\{fL^*\} + |L|^2$$
since $|f - L|^2 = (f - L)(f - L)^* = (f - L)(f^* - L^*)$ and $z + z^* = 2\text{Re}\{z\}$ for all $z$.
Equating the LHS with the RHS, cancelling identical terms on both sides, and dividing both sides by 2 yields $|f||L| = \text{Re}\{fL^*\}$. 
After simple algebra, $$|f| = \text{Re}\left(f \frac{L^*}{|L|}\right) = \text{Re}\{fe^{i\theta}\}$$ where $L = |L| e^{-i\theta}$. 
Since $|e^{i\theta}| = 1$, then $|e^{i\theta}f| = \text{Re}\{e^{i\theta}f\}$, which is the desired expression!
The third part in bold states "so that $e^{ iθ} f(z)$  is real and nonnegative which is impossible for a general complex-valued function $f(z)$. However, this is possible when $f(z)=L ′$ or $f(z)$  is a real-valued function with constant sign."
I don't believe that this is an accurate conclusion.  Let $f=u+iv$ where $u$ and $v$ are respectively the real and imaginary parts of $f$. Upon equating $|f|^2$ with $\left(\text{Re}\left(e^{i\theta}f\right)\right)^2$, one obtains $$u^2+v^2=(u\cos(\theta)-v\sin(\theta))^2$$which simplifies to $$(u\sin(\theta)+v\cos(\theta))^2=0$$Thus, $f$ must be of the form $$f=|u\sec(\theta)|e^{-i\theta}$$which is NOT a purely real-valued function.  However, $fe^{i\theta}$ IS a real-valued, non-negative function.  And I believe that this is probably the author's intended conclusion. 
As a simple counter example for which $f$ doesn't satisfy $f=|u\sec(\theta)|e^{-i\theta}$, let $f(z)=1$ for $\text{Re}(z)>0$ and $f(z)=-1$ for $\text{Re}(z)\le0$.  Then $\lim_{z\to 0}|f(z)| =1$, but $\lim_{z\to 0}f(z)$ is does not exist.
