---
title: Power Series and the Weierstrass Approximation Theorem
module: Sequences and Series of Functions
moduleNumber: 7
lessonNumber: 3
order: 703
summary: >
  A power series converges uniformly on every closed subinterval inside its
  radius of convergence, together with all of its derivatives. That makes it
  continuous, differentiable, and integrable term by term, so a power series
  defines an infinitely differentiable function. The Weierstrass approximation
  theorem then shows that polynomials come uniformly close to any continuous
  function on a closed bounded interval.
topics: [Sequences and Series of Functions]
sources:
  - book: Lebl
    ref: "Ch. 6 — Sequences of Functions; §6.2 Interchange of limits (power series)"
  - book: Rosenlicht
    ref: "Ch. 7 — Interchange of limit operations"
draft: false
---

A **power series** centered at $a$ is a series of functions

$$
\sum_{n=0}^{\infty} c_n (x - a)^n,
$$

whose partial sums are polynomials. The
[interchange theorems](/real-analysis/function-sequences/interchange-of-limits)
apply to it fully: inside its radius of convergence a power series converges
uniformly on every closed subinterval, and so do all of its term-by-term
derivatives. Term-by-term differentiation and integration are therefore valid,
and the sum is an infinitely differentiable function.

## Radius of convergence

A power series converges [absolutely](/real-analysis/sequences-series/absolute-conditional-rearrangement)
inside an interval and diverges outside it. The half-width of that interval is
determined by how fast the coefficients grow.

> **Definition (Radius of convergence).** For $\sum c_n (x-a)^n$, let
> $$
> R = \limsup_{n \to \infty} |c_n|^{1/n}, \qquad \rho = \frac{1}{R},
> $$
> with $\rho = \infty$ when $R = 0$ and $\rho = 0$ when $R = \infty$. The number
> $\rho$ is the **radius of convergence**: the series converges absolutely for
> $|x - a| < \rho$ and diverges for $|x - a| > \rho$.

Inside the interval $(a - \rho, a + \rho)$ the series converges pointwise. At the
two endpoints it may do either, and the behavior there is a separate question.
Between the center and either endpoint the convergence is uniform, which is what
carries continuity and the calculus operations to the limit.

$$
% caption: A power series converges absolutely on the open interval of radius
% $\rho$ about $a$ and diverges outside it; on each closed subinterval $[a-r,a+r]$
% with $r<\rho$ the convergence is uniform.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black] (-5.4,0) -- (5.4,0);
% divergence regions
\fill[black] (-5.4,-0.16) rectangle (-4,0.16);
\fill[black] (4,-0.16) rectangle (5.4,0.16);
% convergence interval
\fill[acc!12] (-4,-0.16) rectangle (4,0.16);
\draw[acc, thick] (-4,-0.22) -- (-4,0.22);
\draw[acc, thick] (4,-0.22) -- (4,0.22);
% uniform subinterval
\draw[acc, very thick] (-2.4,0) -- (2.4,0);
\draw[acc, very thick] (-2.4,-0.28) -- (-2.4,0.28);
\draw[acc, very thick] (2.4,-0.28) -- (2.4,0.28);
\fill[black] (0,0) circle (1.8pt);
\node[black, anchor=south, font=\scriptsize] at (0,0.12) {$a$};
\node[acc, anchor=north, font=\scriptsize] at (0,-0.32) {uniform on this closed piece};
\node[acc, anchor=south, font=\scriptsize] at (3.2,0.22) {converges};
\node[acc, anchor=south, font=\scriptsize] at (-3.2,0.22) {converges};
\node[black, anchor=south, font=\scriptsize] at (4.7,0.22) {diverges};
\node[black, anchor=south, font=\scriptsize] at (-4.7,0.22) {diverges};
\end{tikzpicture}
$$

> **Worked example (Radius from the root formula).** The radius is read off
> $|c_n|^{1/n}$ in three regimes.
>
> - For $\sum 2^n x^n$, $c_n = 2^n$ and $|c_n|^{1/n} = 2$, so $R = 2$ and $\rho = \tfrac12$: convergence for $|x| < \tfrac12$, divergence for $|x| > \tfrac12$.
> - For $\sum \dfrac{x^n}{n!}$, $|c_n|^{1/n} = (n!)^{-1/n} \to 0$, so $R = 0$ and $\rho = \infty$: the exponential series converges on all of $\mathbb{R}$.
> - For $\sum n!\,x^n$, $|c_n|^{1/n} = (n!)^{1/n} \to \infty$, so $R = \infty$ and $\rho = 0$: the series converges only at $x = 0$.

> **Theorem (Uniform convergence of a power series).** Let
> $\sum_{n=0}^{\infty} c_n (x-a)^n$ have radius of convergence $\rho$ with
> $0 < \rho \le \infty$. Then the series converges uniformly on $[a-r, a+r]$ for
> every $0 < r < \rho$. In particular its sum is continuous on
> $(a-\rho, a+\rho)$.

> **Proof.** Fix $0 < r < \rho$. The series converges absolutely at $x = a + r$,
> so $\sum_{n} |c_n| r^n < \infty$. For $x \in [a-r, a+r]$,
> $$
> |c_n (x - a)^n| = |c_n|\,|x-a|^n \le |c_n|\,r^n,
> $$
> so the [Weierstrass
> M-test](/real-analysis/function-sequences/pointwise-uniform-convergence) applies
> with $M_n = |c_n| r^n$: the series converges uniformly on $[a-r, a+r]$. The
> partial sums are polynomials, hence continuous, so their uniform limit is
> continuous on $[a-r, a+r]$. Since $r < \rho$ was arbitrary, the sum is
> continuous on all of $(a-\rho, a+\rho)$. $\;\square$

The convergence is uniform on each closed subinterval but need not be uniform on
the full open interval $(a - \rho, a + \rho)$. The geometric series $\sum x^n$ has
$\rho = 1$ and converges uniformly on every $[-r, r]$ with $r < 1$, but not on
$(-1, 1)$, where its sum $\tfrac{1}{1-x}$ is unbounded near $1$.

## Term-by-term integration and differentiation

Uniform convergence on closed subintervals justifies integration term by term
directly, since integration needs only uniform convergence of the functions.

> **Theorem (Term-by-term integration).** With $f(x) = \sum_{n=0}^{\infty} c_n (x-a)^n$
> on $(a-\rho, a+\rho)$,
> $$
> \int_a^x f = \sum_{n=0}^{\infty} \frac{c_n}{n+1}(x-a)^{n+1},
> $$
> and the integrated series has radius of convergence at least $\rho$.

> **Proof.** Fix $0 < r < \rho$. On $[a-r, a+r]$ the partial sums converge
> uniformly, and for $x$ in that interval the convergence is uniform on $[a, x]$,
> so the [limit and integral
> swap](/real-analysis/function-sequences/interchange-of-limits):
> $$
> \int_a^x f = \int_a^x \lim_{k} \sum_{n=0}^{k} c_n (s-a)^n\,\d s = \lim_{k} \sum_{n=0}^{k} \int_a^x c_n (s-a)^n\,\d s = \sum_{n=0}^{\infty} \frac{c_n}{n+1}(x-a)^{n+1}. \qquad\square
> $$

Differentiation needs more: uniform convergence of the differentiated series. The
key fact is that differentiating a power series does not change its radius,
because $n^{1/n} \to 1$ leaves the $\limsup$ untouched.

> **Theorem (Term-by-term differentiation).** With
> $f(x) = \sum_{n=0}^{\infty} c_n (x-a)^n$ on $(a-\rho, a+\rho)$, $f$ is
> differentiable and
> $$
> f'(x) = \sum_{n=1}^{\infty} n\,c_n (x-a)^{n-1},
> $$
> a series of the same radius of convergence $\rho$.

> **Proof.** Let $R = \limsup_n |c_n|^{1/n}$, so $\rho = 1/R$. Using
> $\lim_n n^{1/n} = 1$, for every $\epsilon > 0$ eventually
> $n^{1/n} < 1 + \epsilon$, hence
> $$
> R = \limsup_n |c_n|^{1/n} \le \limsup_n |n c_n|^{1/n} \le (1+\epsilon)\limsup_n |c_n|^{1/n} = (1+\epsilon) R.
> $$
> Letting $\epsilon \to 0$ gives $\limsup_n |n c_n|^{1/n} = R$, so
> $\sum n c_n (x-a)^n$ has radius $\rho$; the differentiated series
> $\sum n c_n (x-a)^{n-1}$ does too. On each $[a-r, a+r]$ with $r < \rho$ the
> differentiated series therefore converges uniformly, and the original converges
> at $x = a$, so the [limit-and-derivative
> theorem](/real-analysis/function-sequences/interchange-of-limits) gives
> $f' = \sum_{n \ge 1} n c_n (x-a)^{n-1}$. Since $r < \rho$ was arbitrary, this
> holds on $(a-\rho, a+\rho)$. $\;\square$

Applying the theorem to $f'$, then to $f''$, and so on, each derivative is again a
power series with radius $\rho$. A power series therefore defines an infinitely
differentiable function on its interval of convergence.

$$
% caption: Differentiating gives $\sum n c_n (x-a)^{n-1}$ and integrating gives
% $\sum \frac{c_n}{n+1}(x-a)^{n+1}$; both keep the radius $\rho$ fixed, so the
% process iterates and every derivative is again a power series of radius $\rho$.
\begin{tikzpicture}[scale=1.0, font=\footnotesize,
  row/.style={draw, minimum width=34mm, minimum height=11mm, align=center, font=\scriptsize}]
\definecolor{acc}{HTML}{4A6FA5}
\node[row, draw=acc] (f) at (0,2) {the power series};
\node[row] (df) at (-2.6,0) {derivative series};
\node[row] (idf) at (2.6,0) {integral series};
\draw[->, acc, thick] (f) -- (df) node[pos=0.55, above left, font=\scriptsize] {take derivative};
\draw[->, acc, thick] (f) -- (idf) node[pos=0.55, above right, font=\scriptsize] {integrate};
\node[black, font=\scriptsize] at (0,-1.2) {all three share the same radius};
\end{tikzpicture}
$$

> **Worked example (The exponential from its series).** Set
> $f(x) = \sum_{n=0}^{\infty} \dfrac{x^n}{n!}$, which has $\rho = \infty$ and
> $f(0) = 1$. Differentiating term by term,
> $$
> f'(x) = \sum_{n=1}^{\infty} \frac{n x^{n-1}}{n!} = \sum_{n=1}^{\infty} \frac{x^{n-1}}{(n-1)!} = \sum_{m=0}^{\infty} \frac{x^m}{m!} = f(x),
> $$
> so $f' = f$ with $f(0) = 1$. This defines the exponential and recovers its
> defining differential equation, treated constructively via
> [Picard iteration](/real-analysis/function-sequences/picard-ode).

## Analytic functions

A function that is locally the sum of a convergent power series has more structure
than a merely smooth one.

> **Definition (Analytic function).** A function $f$ is **analytic** at $a$ if
> there is $\rho > 0$ such that $f(x) = \sum_{n=0}^{\infty} c_n (x-a)^n$ for all
> $|x - a| < \rho$. Differentiating $n$ times and evaluating at $a$ forces
> $c_n = \dfrac{f^{(n)}(a)}{n!}$, so the series is the
> [Taylor series](/real-analysis/differentiation/taylors-theorem) of $f$ at $a$.

Every analytic function is infinitely differentiable, but the converse fails: a
function can be smooth and still not equal its Taylor series. The standard example
is $g(x) = e^{-1/x^2}$ for $x \neq 0$ and $g(0) = 0$, which is infinitely
differentiable with $g^{(n)}(0) = 0$ for all $n$. Its Taylor series at $0$ is
identically $0$, yet $g(x) > 0$ for $x \neq 0$, so the series represents $g$ at no
point other than $0$. Being infinitely differentiable is weaker than being
analytic.

$$
% caption: The function $g(x)=e^{-1/x^2}$ (with $g(0)=0$) is smooth and positive
% off the origin, but every derivative vanishes at $0$, so its Taylor series there
% is identically $0$ and matches $g$ at no other point.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, ->] (-3.2,0) -- (3.3,0) node[anchor=north east] {$x$};
\draw[black, ->] (0,-0.25) -- (0,2.3) node[anchor=north east] {$y$};
\draw[acc, very thick] plot[domain=-3:3, samples=160] (\x, {1.9*exp(-1/(\x*\x))});
\node[acc, anchor=south west, font=\scriptsize] at (2.15,1.45) {$g$};
\fill[black] (0,0) circle (1.8pt);
\node[black, anchor=north, font=\scriptsize] at (0,-0.08) {derivatives vanish at $0$};
\end{tikzpicture}
$$

## The Weierstrass approximation theorem

Power series show that some continuous functions are uniform limits of
polynomials. The Weierstrass approximation theorem removes the qualifier: every
continuous function on a closed bounded interval is a uniform limit of
polynomials, whether or not it is analytic, and even where it is nowhere
differentiable.[^rosen-approx]

> **Theorem (Weierstrass approximation).** Let $f : [a, b] \to \mathbb{R}$ be
> continuous. For every $\epsilon > 0$ there is a polynomial $p$ with
> $$
> \|f - p\|_{[a,b]} = \sup_{x \in [a,b]} |f(x) - p(x)| < \epsilon.
> $$
> Equivalently, the polynomials are **dense** in $C[a,b]$ under the uniform norm.

A constructive proof uses the **Bernstein polynomials**. Reduce to $[0,1]$ by an
affine change of variable, and for $f \in C[0,1]$ define

$$
B_n(x) = \sum_{k=0}^{n} f\!\left(\frac{k}{n}\right) \binom{n}{k} x^k (1-x)^{n-k}.
$$

The weights $\binom{n}{k} x^k (1-x)^{n-k}$ are the probabilities of a binomial
count, so $B_n(x)$ is a weighted average of the sampled values $f(k/n)$, with the
weight concentrated near $k/n \approx x$. Two identities drive the proof:

- **The weights sum to one** and have mean $x$:
  $\sum_k \binom{n}{k} x^k (1-x)^{n-k} = 1$ and
  $\sum_k \tfrac{k}{n}\binom{n}{k} x^k (1-x)^{n-k} = x$.
- **The spread is small.** The variance identity
  $$
  \sum_{k=0}^{n} \left(\frac{k}{n} - x\right)^2 \binom{n}{k} x^k (1-x)^{n-k} = \frac{x(1-x)}{n} \le \frac{1}{4n}
  $$
  forces the weight onto indices with $k/n$ near $x$.

Given $\epsilon > 0$, uniform continuity of $f$ on the compact interval $[0,1]$
gives $\delta > 0$ with $|f(s) - f(t)| < \epsilon$ whenever $|s - t| < \delta$.
Split $B_n(x) - f(x) = \sum_k \big(f(\tfrac{k}{n}) - f(x)\big) w_k(x)$ into indices
with $|\tfrac{k}{n} - x| < \delta$, where each term is under $\epsilon$, and the
rest, whose total weight is at most $\tfrac{1}{4n\delta^2}$ by the variance bound
and hence small for large $n$. Both parts are controlled uniformly in $x$, so
$\|f - B_n\|_{[0,1]} \to 0$.

$$
% caption: Bernstein polynomials $B_n$ close in uniformly on a continuous target
% $f$ on $[a,b]$; higher degree tightens the fit everywhere at once.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, ->] (-0.15,0) -- (5.6,0) node[anchor=north east] {$x$};
\draw[black, ->] (0,-0.15) -- (0,2.9) node[anchor=north east] {$y$};
\node[black, anchor=north, font=\scriptsize] at (0.4,-0.05) {$a$};
\node[black, anchor=north, font=\scriptsize] at (5.2,-0.05) {$b$};
% target: a peaked continuous (corner-like) function
\draw[black!75, very thick] (0.4,0.5) -- (2.8,2.4) -- (5.2,0.7);
\node[black!75, anchor=south west, font=\scriptsize] at (2.85,2.35) {$f$};
% low degree approximation (smooth, loose)
\draw[acc!45, thick] plot[smooth, domain=0.4:5.2, samples=60] (\x, {0.55 + 1.7*exp(-((\x-2.8)*(\x-2.8))/2.6)});
\node[acc!60, anchor=north, font=\scriptsize] at (1.35,1.05) {$B_3$};
% higher degree (tighter)
\draw[acc, very thick] plot[smooth, domain=0.4:5.2, samples=100] (\x, {0.6 + 1.82*exp(-((\x-2.8)*(\x-2.8))/0.85)});
\node[acc, anchor=north, font=\scriptsize] at (4.55,0.4) {$B_{12}$};
\end{tikzpicture}
$$

The construction is quantitative. The polynomials are named explicitly, and their
degree $n$ controls the error through $\tfrac{1}{4n\delta^2}$, so a target
accuracy dictates a concrete degree. The theorem also has a structural reading:
$C[a,b]$ with the uniform norm is a
[complete metric space](/real-analysis/metric-spaces/convergence-completeness),
and Weierstrass says the polynomials form a dense subset of it, so a function is
continuous if and only if it is a uniform limit of polynomials.

## Summary

| Operation on $\sum c_n (x-a)^n$ | Needs | Result |
| --- | --- | --- |
| Continuity of the sum | uniform on $[a-r,a+r]$ | continuous on $(a-\rho, a+\rho)$ |
| Term-by-term $\int$ | uniform convergence of terms | radius $\ge \rho$ |
| Term-by-term $\tfrac{\d}{\d x}$ | uniform convergence of derivatives | radius $= \rho$, iterable |
| Analytic $\Rightarrow$ smooth | $c_n = f^{(n)}(a)/n!$ | infinitely differentiable |
| Weierstrass density | uniform continuity on $[a,b]$ | polynomials dense in $C[a,b]$ |

Uniform convergence, established by the M-test on closed subintervals, is the
single hypothesis underneath the first three rows. The last two rows separate
the cases: analytic functions are precisely those a series represents, and
Weierstrass shows polynomials still approximate every continuous function as
closely as desired.

[^rosen-approx]: Rosenlicht, Ch. 7 — Interchange of limit operations, treats uniform convergence and the approximation of continuous functions by polynomials on a closed bounded interval. The Bernstein-polynomial construction gives an explicit approximating sequence and an error controlled by the modulus of continuity of $f$.
