# Partial fraction decomposition of cotangent

I am trying to understand the derivation of the partial fraction decomposition of the cotangent. Therefore I have some notes but unfortunately there is a little detail I do not understand.

We are considering

\begin{align} f: \mathbb{C}\setminus \mathbb{Z} \to \mathbb{C}, \quad f(z):= \pi \cot(\pi z) = \frac{\pi \cos(\pi z)}{\sin(\pi z)} \end{align} and we are trying to prove that

\begin{align} \frac{1}{z} + \sum_{n=1}^{\infty} \left(\frac{1}{z+n} + \frac{1}{z-n}\right) = \pi \cot(\pi z). \end{align}

With the help of the following statement

Theorem: Let $$D \subset \mathbb{C}$$ open, $$z_0 \in D$$ and $$g,h: D \to \mathbb{C}$$ holomprohic, where $$g(z_0) \neq 0$$, $$h(z_0) = 0$$ and $$h'(z_0) \neq 0$$.Then there exists a neighbourhood $$U$$ of $$z_0$$ such that

\begin{align} f: U \setminus \{z_0\} \to \mathbb{C}, \quad f(z):= \frac{g(z)}{h(z)} \end{align} is holomorphic and has a simple pole at $$z_0$$ with \begin{align} \operatorname{Res}_{z_0}f = \frac{g(z_0)}{h'(z_0)}. \end{align}

So far so good. Now applying this Theorem on our function $$f$$ yields that, for $$n_0 \in \mathbb{Z}$$, we can write

\begin{align} f(z) = \frac{1}{z-n_0} + p(z) \quad \forall z \in U\setminus \{n_0\} \end{align}

where the first term is the principle part (with residue $$1$$ (follows from Theorem)) of a Laurent series of $$f$$ - the Laurent series we are interested in, since we want to derive the partial fraction decomposition. $$p(z)$$ is the regular part of the laurent series. We only know that $$p(z)$$ is holomorphic.

Based on these oberservations the notes "guess" that the partical defraction decomposition of the cotangent could look like

\begin{align} f(z) = \frac{1}{z} + \sum_{n=1}^{\infty} \left(\frac{1}{z+n} + \frac{1}{z-n}\right). \end{align}

From now on they proof that it actually is the partical defraction decomposition by showing that

\begin{align} \frac{1}{z} + \sum_{n=1}^{\infty} \left(\frac{1}{z+n} + \frac{1}{z-n}\right) \end{align}

is holomorphic and - in the second part - is identical to $$\pi \cot(\pi z)$$. That second part is where my question can be found.

In order to show that

\begin{align} \frac{1}{z} + \sum_{n=1}^{\infty} \left(\frac{1}{z+n} + \frac{1}{z-n}\right) \end{align}

and $$\pi \cot(\pi z)$$ are identical we consider the help function

\begin{align} h(z) := \frac{1}{z} + \sum_{n=1}^{\infty} \left(\frac{1}{z+n} + \frac{1}{z-n}\right) - \pi \cot(\pi z). \end{align}

We obviously try showing that $$h = 0$$. And finally to my question:

Question: The note states that $$h$$ can be extended to an entire fuction since "the regular parts of the laurent series cancel each other out".

I don't get that. Shouldn't it be the principal parts?