When can $f(z)$ be extended to be analytic on $D$? Here is my confusion. I used to thought the following.

Let $f(z)$ be holomorphic on some punctured disk $C_R-\{0\}$. If zero is a removable singularity, then $f(z)$ can be "made" analytic on the whole disk, by redefining $f(0) := \lim_{z\to 0} f(z)$.

For example, $f(z) = \frac{1-\cos(z)}{z^2}$ has a removable singularity at $z=0$, since $\lim_{z\to 0} f(z) = \frac{1}{2}$, by L'Hopital or Laurent series.
Then I thought

If I can show that $\lim_{z\to 0} f(z)$ exists, then that means the singularity at zero is removable.

But this entries from Wikipedia confuses me:

Let $D \subset C$ be an open subset of the complex plane, $a\in D$, and $f$ a holomorphic function defined on $D - \{a\}$. The following are equivalent:

*

*$f$ is holomorphically extendable over $a$.

*$\lim_{z\to a} (z-a)f(z) = 0$

Why do we have $\lim_{z\to a} (z-a)f(z) =0$, instead of $\lim_{z\to a} f(z)$ exists? Wouldn't this give us contradictory result?
As a concrete example, considere some $f(z)$ defined on $\mathbb{C}-\{0\}$ and satisifes
$$\left| f(z) \right| < \sqrt{\left| z \right|} + \frac{1}{\sqrt{\left| z \right|}}$$
If we consider $\lim_{z\to 0} f(z)$, then it doesn't exist. So it shouldn't be extendable. But if we consider $\lim_{z\to 0} zf(z)$, this equal to zero. Thus, as suggested by this answer, it is actually extendable.
What is going wrong here?
 A: Holomorphic functions have quite a lot of rigidity. In particular, holomorphic functions cannot have arbitrary growth behaviour at an isolated singularity.
Let $f$ be holomorphic on a punctured disk $\{ z : 0 < \lvert z-a\rvert < R\}$. Consider the following conditions on $f$:


*

*$f$ has a holomorphic extension to the disk $\{ z : \lvert z-a\rvert < R\}$.

*$\lim\limits_{z \to a} f(z)$ exists (in $\mathbb{C}$).

*There is an $r \in (0,R]$ such that $f$ is bounded on $\{ z : 0 < \lvert z-a\rvert < r\}$.

*$\lim\limits_{z\to a}\: (z - a) f(z) = 0$.


Then it is almost trivial to see that each condition implies the following condition(s). But for holomorphic $f$, the weakest of these conditions is strong enough to imply the strongest. Let us prove that.
So assume $(z - a)f(z) \to 0$ as $z\to a$, and consider the function
$$F \colon z \mapsto \begin{cases}(z - a)^2 f(z) &, z \neq a \\ \qquad 0 &, z = a.\end{cases}$$
On the punctured disk, $F$ is the product of two holomorphic functions, and therefore holomorphic. Since already $(z-a)\cdot f(z) \to 0$ as $z \to a$, $F$ is clearly continuous at $a$. And
$$\lim_{z\to a} \frac{F(z) - F(a)}{z - a} = \lim_{z\to a} \frac{(z-a)^2 f(z)}{z-a} = \lim_{z\to a} (z-a)f(z) = 0,$$
so $F$ is complex differentiable at $a$ too, with $F'(a) = 0$. This means $F$ is holomorphic on the full disk $\{ z : \lvert z-a\rvert < R\}$. Therefore, $F$ has a power series expansion about $a$,
$$F(z) = \sum_{n = 0}^\infty a_n (z-a)^n.$$
In this power series expansion, we have $a_n = \frac{1}{n!} F^{(n)}(a)$, and we saw that $F(a) = F'(a) = 0$, so in fact
$$F(z) = \sum_{n = 2}^\infty a_n (z-a)^n = (z-a)^2 \sum_{n = 0}^\infty a_{n+2}(z-a)^n,$$ and therefore
$$f(z) = \frac{F(z)}{(z-a)^2} = \sum_{n = 0}^\infty a_{n+2}(z-a)^n\tag{$\ast$}$$
for $0 < \lvert z-a\rvert < R$.
But the right hand side of $(\ast)$ clearly defines a holomorphic function on the full disk $\{ z : \lvert z-a\rvert < R\}$, and thus yields the desired holomorphic extension of $f$.
Although for the holomorphic extensibility of $f$ the boundedness near $a$, and the existence of $\lim\limits_{z\to a} f(z)$ are clearly necessary, a formally weaker condition is in fact sufficient. Such is the power of complex analyticity.
