# Exchanging order of limits

Let $(a_n)_{n \in \mathbb{N}}$ be a real sequence, s. t. $\lim_{n \rightarrow \infty} a_n$ exists. Does the following equality hold? $$\lim_{x \rightarrow 1^-} \left( \lim_{m \rightarrow \infty} \left(1 - x\right) \sum_{n=0}^m a_n x^n\right) = \lim_{m \rightarrow \infty} \left( \lim_{x \rightarrow 1^-} \left(1 - x\right) \sum_{n=0}^m a_n x^n\right)$$

Can I exchange the order of these two limits? And if yes, why? Thanks for your help!

A counterexample is $$f_m(x) = (1-x)\sum_{n=0}^m x^n$$ that is, with $a_n = 1$ for all $n$. The limit is $f : (-1,+1] \to \mathbb R$ given by $$f(x) = \begin{cases} 1 & x \in (-1,1)\\ 0 & x = 1. \end{cases}$$ So $$\lim_{x\to 1^-} f(x) = 1, \quad \text{while} \quad \lim_{x\to 1^-} f_m(x) = 0 \quad \forall m.$$
To show that $f_m \to f$. Suppose that every $f_m$ is defined in all $\mathbb R$. Now, the geometric series surely diverges for all $x \notin (-1,1)$, so the domain of $f$ is contained in $[-1,1]$. Let's see what happens at the endpoints of this interval: we have $$f_m(-1) = 2 \sum_{n=0}^m (-1)^n, \qquad f_m(1) = 0\quad \forall m.$$ The first is an oscillating sequence, the second converges to $0$. So $-1 \notin \mathrm{dom} f$, and $1 \in \mathrm{dom} f$ with $f(1) = 0$.
Now let's consider a point $x \in (-1,1)$. The geometric series $s_m(x) = \sum_{n=0}^m x^n$ converges to $s(x) = 1/(1-x)$ in this interval, so $$\lim_{m\to\infty} f_m(x) = \lim_{m\to\infty} (1-x) s_m(x) = (1- x) \lim_{m\to\infty} s_m(x) = (1- x) s(x) = \frac{1-x}{1-x} = 1.$$
No. Consider the case $a_n=1$ for all $n \ge 0$ (geometric series).