Let $f$ be an analytic function in $\mathbb{C} \cup \{\infty\}$ except a finite number of poles. I need to prove that $f$ is rational.
Let the poles be $a_1,...,a_k$, So I know that $f$ can be written as $\frac{g(z)}{(z-a_1)^{m_1} \cdots (z-a_k)^{m_k}}$ whrere $g$ is entire and $g(a_i) \neq 0$ for every $i$.
Since $g$ is analytic, I can write it as a power series. However, here I got stuck since I don't see how to show that this power series has only finite amount of powers.
Help would be appreciated.
If $g$ has a pole at $\infty$ then $|g(z)| \to \infty$ as $|z| \to \infty$ and it is well known that $g$ is a polynomial in this case. [See If $f$ is entire and $f(z)\to \infty$, for $z\to \infty$ , then $f(z)$ is polynomial ] Otherwise $g$ is entire and it is also analytic at $\infty$ which makes it bounded. By Louivile's Theorem $g$ is a constant so $f$ is a rational function.