How to know if some series doesn't converge to a rational function

Your logic is fine in the second case.


For the third case, recall the following:

If $f$ and $g$ are analytic in an open, connected set $D$ and are equal on a set having an accumulation point in $D$, then $f = g$ throughout $D$.

This result quickly gives that analytic continuations are unique. We can likewise show that meromorphic continuations are unique.

To this end, suppose that $m_1$ and $m_2$ are two meromorphic extensions of $f$. Then $m_1$ and $m_2$ must each have a (at most) countable sets of poles $P_1$ and $P_2$ respectively. Then $D \equiv \mathbb{C}\setminus(P_1 \cup P_2)$ will be connected and open since poles of meromorphic functions are isolated; as such, the restrictions of $m_1$ and $m_2$ to $D$ will be analytic functions equal on the open, connected set $D$ and are thus equal on $D$. To finish the argument, I quote Daniel Fischer:

$m_1$ and $m_2$ are the same function (at least outside the union of the singular sets). The Laurent expansion around an isolated singularity is determined by the values of the function on an arbitrarily small punctured neighborhood. That means $m_1$ and $m_2$ have the same Laurent expansion around each $z \in S_1 \cup S_2$. In other words, a meromorphic continuation is unique modulo gratuitous introduction of removable singularities.


The first series converges uniformly to some $f$ in $\overline {\mathbb D},$ and diverges for all other $z.$ Thus $f$ is analytic in $\mathbb D.$ Suppose $f=R$ in some domain $U,$ where $R$ is a rational function. Then $U\subset \mathbb D.$ Let $P$ be the set of poles of $R.$ Then $f,R$ are both analytic in $\mathbb D\setminus P,$ which is also a domain. By the identity principle, $f=R$ in $\mathbb D\setminus P.$ Since $f$ has no singularities in $D(0,1),$ neither does $R.$ Therefore $f=R$ in $\mathbb D.$ Now $f$ extends continuously to $\overline {\mathbb D},$ hence so does $R.$ Therefore $R$ has no poles in $\overline {\mathbb D}.$ It follows that $R$ is analytic in some $D(0,r), r>1.$ Thus $f$ has an analytic extension to $D(0,r).$ Therefore the power series defining $f$ converges in $D(0,r),$ contradiction.

Added later For the third series: Let $\Omega =\mathbb C\setminus \{0,1,2,\dots\}.$ Note that $\Omega$ is an open connected set. The given series converges uniformly on compact subsets of $\Omega$ to an analytic function $f,$ and $f$ has a pole at each point of $\{0,1,2,\dots\}.$ (Please ask if you have questions on this.) Let $R$ be a rational function, and let $P$ be the set of poles of $R.$ Then both $f,R$ are analytic on $\Omega \setminus P,$ which is also an open connected set. Suppose $f=R$ on an open subset of $\Omega \setminus P.$ Then by the identity principle, $f=R$ everywhere in $\Omega \setminus P.$ It follows that $R$ has a pole at each point of $\{0,1,2,\dots\}.$ This is a contradiction, since $R$ has at most a finite number of poles.