All real continuous functions on the closed unit interval are analytic Suppose $f:[0,1] \to \mathbb{R}$ is a continuous function. By Weierstrass' theorem there exist a sequence of polynomials $\{p_i\}$ so that $p_i \to f$ uniformly. Now define the following sequence $\{q_i\}$ by $q_1 = p_1$ and $q_i = p_i - p_{i-1}$. Then we have that $\sum_{i=0} ^n q_i \to f$ uniformly. And thus, $\sum_{i=0} ^{\infty}q_i$ is a sum of polynomials and hence a power series that converges to $f$ so $f$ is analytic.
What is the mistake?
 A: The mistake is that your sum up to $N$ of polynomials may mess with the "first" coefficients when you group them up in a power-series-like way whenever you change $N$. A power series doesn't allow that: whenever you truncate, the coefficients of a smaller truncation are "preserved".
As an analogy, consider a line of people forming outside your house, one day at a time. A power series is just new people coming. Your sum can change the people that were there yesterday.
To see this happen mathematically, take a sequence of polynomials approximating $f(x)=|x|$ in $[-1,1]$. 
More concretely, suppose for instance that your $q_0=x$, $q_1=x^2-3x+1$ and $q_2=-2x^2+8x-4$. Then $\sum_{i=0}^1q_i=x^2-2x+1,$ $\sum_{i=0}^2 q_i=-x^2+6x-3$. How do you propose to form a power series if this keeps happening (which is certainly allowed)?
A: Define the Chebyshev polynomials in the usual way:
$$\begin{eqnarray}
T_0(x) && = && 1 \\
T_1(x) && = && x \\
T_{n+2}(x) && = && 2xT_{n+1}(x) - T_n(x)
\end{eqnarray}$$
Recall that these have the property that $T_n(\cos(\theta)) = \cos(n\theta)$. In particular, $-1 \leq T_n(x) \leq 1$ for $-1 \leq x \leq 1$.
Let $q_0(x) = 0$ and for $i>0$ let $q_i(x) = (-1)^i T_{3i}(x)/i^2$. As in the question, let $f(x) = \sum_{i=0}^\infty q_i(x)$, and note that the convergence is uniform in [0, 1]. Here is a graph of $f$; clearly it is not analytic:

Let's try to compute the power series as suggested in the question. What is the coefficient of $x^3$? In $T_n(x)$, the coefficient of $x^3$ grows as $n^3$. Therefore, in $q_i(x)$ the coefficient of $x^3$ grows as $i$. We have to sum that series, but the sum diverges.
A: First of all, a power series is the limit of a sequence of the form $f_k(x) = \sum_{n=0}^k c_n x^n$ but here it is $f_k(x) = \sum_{n=0}^{d_k} c_{n,k} x^n$ which is different, so the theorems about power series don't apply.

More generally, the mistake is that if a sequence of complex analytic functions $f_n : \mathbb{C} \to \mathbb{C}$ converges uniformly to $f$ on $U \subset \mathbb{C}$ then :


*

*$f$ is continuous on $U$

*if $U$ is open in the complex topology, then $f$ is complex analytic on $U$. But $U = (0,1)$ is open in the real-line topology, not in the complex topology
($U$ is open in the complex topology iff for any $z_0 \in U$, there exists $\epsilon > 0$ such that $\{z \in \mathbb{C}, |z-z_0| < \epsilon\} \subset U$)
An useful example is with the Fourier series : if $f$ is $2\pi$ periodic and continuous then $f_n(x) = \sum_{k=-n}^k c_k e^{ikx}, c_k = \frac{1}{2\pi} \int_0^{2\pi} f(x) e^{-ikx}dx$ is a sequence of analytic functions converging uniformly to $f$. But of course this doesn't mean $f$ is analytic.
