Power Series and Taylor Series: Polynomials of Infinite Degree
How does a calculator compute \(\sin 0.3\) or \(e^{1.7}\)? It doesn't have a table; it adds up a few terms of a power series. Power series let us treat functions like \(e^x\), \(\sin x\) and \(\ln(1 + x)\) as "polynomials of infinite degree", which can be differentiated, integrated and evaluated with ease. This post explains where they converge, how to build them, and how to use them.
1. Power series and the interval of convergence
A power series centred at \(x = a\) is a series of the form
It is a special series of functions (previous post), and the most important one. Its partial sums are ordinary polynomials.
Theorem · Interval of convergence
For every power series \( \sum a_n(x - a)^n \) there is a number \(R\) (\(0 \le R \le \infty\)) such that the series
converges (in fact absolutely) for \( |x - a| < R \), and
diverges for \( |x - a| > R \).
The interval \( (a - R,\ a + R) \) is called the interval of convergence, and \(R\) its radius of convergence. At the endpoints \(x = a \pm R\), the series may converge or diverge; they must be checked separately.
Figure 1. A power series converges inside a symmetric interval around its centre and diverges outside it.
Why an interval? If the series converges at some point \(x_0\), its terms are bounded there, and for any \(x\) closer to \(a\) the terms are dominated by a convergent geometric series \( \sum M q^n \), with \( q = \frac{|x - a|}{|x_0 - a|} < 1 \). So convergence at one point spreads to everything closer to the centre. The boundary between "converges" and "diverges" is therefore at the same distance \(R\) on both sides.
2. Computing the radius of convergence
Formulas for R
The radius is given by the Cauchy–Hadamard formula
\[ \frac1R = \limsup_{n\to\infty}\sqrt[n]{|a_n|}, \]
or, if the following limit exists, by the simpler formula
\[ R = \lim_{n\to\infty}\left|\frac{a_n}{a_{n+1}}\right|. \]
(With the conventions \(\frac10 = \infty\), \(\frac1\infty = 0\).)
These are just the root test and the ratio test from the first post, applied to \( |a_n(x - a)^n| \). Note that the ratio formula has \(a_n\) on top and \(a_{n+1}\) below, the reverse of the ratio test, because we solve \( |x - a|\cdot\left|\frac{a_{n+1}}{a_n}\right| < 1 \) for \(|x - a|\).
Example 1 · Three typical cases
\( \sum\frac{x^n}{n!} \): \( R = \lim\frac{(n+1)!}{n!} = \lim(n + 1) = \infty \). Converges for all \(x\).
\( \sum n!\,x^n \): \( R = \lim\frac{n!}{(n+1)!} = 0 \). Converges only at \(x = 0\).
\( \sum\frac{x^n}{n} \): \( R = \lim\frac{n+1}{n} = 1 \). At \(x = 1\) (harmonic series) it diverges; at \(x = -1\) (alternating harmonic) it converges. Interval: \([-1, 1)\).
Example 2 · A shifted centre
\( \displaystyle\sum_{n=1}^\infty \frac{(x - 2)^n}{n\,3^n} \). Here \( a_n = \frac{1}{n3^n} \), so \( R = \lim\frac{(n+1)3^{n+1}}{n3^n} = 3 \). The interval is \( (2 - 3, 2 + 3) = (-1, 5) \).
Endpoints: at \(x = 5\) we get \( \sum\frac1n \) (diverges); at \(x = -1\) we get \( \sum\frac{(-1)^n}{n} \) (converges by Leibniz). Final answer: \( [-1, 5) \).
When the ratio formula can't be used
For \( \sum_{n=0}^\infty \frac{x^{2n}}{4^n} \), every odd coefficient is zero, so \( \frac{a_n}{a_{n+1}} \) is undefined. Either use the root formula, or treat it as a series in \( t = x^2 \): \( \sum\big(\frac{t}{4}\big)^n \) converges for \( t < 4 \), i.e. \( |x| < 2 \). So \(R = 2\).
3. Properties of power series
Inside the interval of convergence, power series behave like polynomials. This follows from the previous post: on any closed interval \( [a - r, a + r] \) with \( r < R \), Weierstrass's test (with \( c_n = |a_n|r^n \)) shows the convergence is uniform. Therefore:
Properties (for \( |x - a| < R \))
The sum \( f(x) = \sum a_n(x - a)^n \) is continuous.
It can be differentiated term by term, and the derived series has the same radius \(R\):
\[ f'(x) = \sum_{n=1}^\infty na_n(x - a)^{n-1}. \]
Repeating this, \(f\) has derivatives of all orders.
It can be integrated term by term, again with the same radius:
\[ \int_a^x f(t)\,dt = \sum_{n=0}^\infty \frac{a_n}{n+1}(x - a)^{n+1}. \]
Abel's theorem: if the series also converges at an endpoint, say \(x = a + R\), then the sum is continuous there from the inside: \( \lim_{x\to (a+R)^-} f(x) = \sum a_nR^n \).
Property 4 is exactly the argument we used in the previous post to prove \( 1 - \frac12 + \frac13 - \cdots = \ln 2 \). Note that differentiation and integration keep \(R\) but may change the behaviour at the endpoints.
4. Taylor series
Suppose a function can be written as a power series, \( f(x) = \sum a_n(x - a)^n \). What must the coefficients be? Put \(x = a\): \( f(a) = a_0 \). Differentiate once and put \(x = a\): \( f'(a) = a_1 \). Differentiate twice: \( f''(a) = 2a_2 \). In general \( f^{(n)}(a) = n!\,a_n \). So the coefficients are completely determined by the derivatives at the centre:
\[ a_n = \frac{f^{(n)}(a)}{n!}. \]
Taylor series
If \(f\) has derivatives of all orders at \(x = a\), the series
\[ f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}(x - a)^n = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \cdots \]
is called the Taylor series of \(f\). For \(a = 0\) it is often called the Maclaurin series.
The first two terms, \( f(a) + f'(a)(x - a) \), are the tangent line from the post on the differential. Each further term adds a better "bend": the second-degree term matches the curvature, the third matches how the curvature changes, and so on.
The remainder
Taylor's formula with remainder (Lagrange form)
The error made by stopping after the term of degree \(n\) is
\[ R_n(x) = f(x) - \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x - a)^k = \frac{f^{(n+1)}\big[a + \theta(x - a)\big]}{(n+1)!}(x - a)^{n+1} \qquad (0 < \theta < 1). \]
The Taylor series converges to \(f(x)\) exactly when \( R_n(x) \to 0 \) as \(n \to \infty\).
The remainder looks just like the next term of the series, except that the derivative is evaluated at some unknown point between \(a\) and \(x\). In practice you bound that derivative from above.
Infinitely many derivatives are not enough
It is tempting to think that any function with continuous derivatives of all orders equals its Taylor series near \(a\). It is not true. The classic counterexample is
\[ f(x) = \begin{cases} e^{-1/x^2}, & x \ne 0,\\ 0, & x = 0. \end{cases} \]
It is infinitely differentiable, and all its derivatives at \(0\) are zero. So its Maclaurin series is \( 0 + 0x + 0x^2 + \cdots = 0 \), which converges everywhere, but to \(0\), not to \(f(x)\) (except at \(x = 0\)). The function is extremely flat at the origin, too flat for any power series to notice. The condition to check is always \( R_n(x) \to 0 \).
5. The standard expansions
The following Maclaurin series (\(a = 0\)) should be known by heart; most other expansions are built from them.
Exponential, sine and cosine
\[ e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots \qquad (-\infty < x < \infty), \]
\[ \sin x = \sum_{n=1}^\infty (-1)^{n-1}\frac{x^{2n-1}}{(2n-1)!} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots \qquad (-\infty < x < \infty), \]
\[ \cos x = \sum_{n=0}^\infty (-1)^n\frac{x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots \qquad (-\infty < x < \infty). \]
Proof for \(e^x\): all derivatives are \(e^x\), so \( f^{(n)}(0) = 1 \). For the remainder, \( |R_n(x)| = \frac{e^{\theta x}}{(n+1)!}|x|^{n+1} \le e^{|x|}\frac{|x|^{n+1}}{(n+1)!} \to 0 \) for every \(x\), because factorials grow faster than powers.
For \(\sin x\) and \(\cos x\): the derivatives cycle through \( \pm\sin x, \pm\cos x \) (post on higher derivatives), so at \(0\) they are \(0, 1, 0, -1, \dots\), and every derivative is bounded by \(1\): \( |R_n(x)| \le \frac{|x|^{n+1}}{(n+1)!} \to 0 \). Notice that \(\sin\) (an odd function) has only odd powers, and \(\cos\) (even) only even powers.
Figure 2. \(\sin x\) (black) and its Taylor polynomials of degree 1, 3 and 5. Each extra term extends the range where the polynomial hugs the curve.
Binomial series
For any real \(\alpha\),
\[ (1 + x)^\alpha = \sum_{n=0}^\infty \binom\alpha n x^n, \qquad \binom\alpha n = \frac{\alpha(\alpha - 1)\cdots(\alpha - n + 1)}{n!}, \quad \binom\alpha0 = 1. \]
It converges to \((1 + x)^\alpha\) on
\( -1 < x < 1 \) if \( \alpha \le -1 \);
\( -1 < x \le 1 \) if \( -1 < \alpha < 0 \);
\( -1 \le x \le 1 \) if \( \alpha > 0 \) (and for all \(x\) if \(\alpha\) is a natural number: then the series is a finite polynomial).
When \(\alpha = n\) is a natural number, \( \binom\alpha k = 0 \) for \(k > n\), and this is the ordinary binomial theorem. For other \(\alpha\), the series never stops.
Example 3 · Two important special cases
\[ \sqrt{1 + x} = 1 + \frac x2 - \frac{x^2}{8} + \frac{x^3}{16} - \cdots \qquad (\alpha = \tfrac12), \]
\[ \frac{1}{1 + x} = 1 - x + x^2 - x^3 + \cdots \qquad (\alpha = -1,\ \text{the geometric series}). \]
Check one coefficient: \( \binom{1/2}{2} = \frac{\frac12\cdot(-\frac12)}{2} = -\frac18 \). The first two terms, \( \sqrt{1 + x} \approx 1 + \frac x2 \), are the approximation from the post on the differential.
We derived this series in the previous post by integrating the geometric series \( \frac{1}{1+t} = \sum(-1)^nt^n \) term by term, and showed with Abel's test that it also holds at \(x = 1\), giving \( \ln 2 = 1 - \frac12 + \frac13 - \cdots \).
Building new series from old ones
Computing Taylor coefficients by differentiation can be laborious. Usually it's faster to substitute, multiply, differentiate or integrate known series. By uniqueness of power series (the coefficients must be \( \frac{f^{(n)}(a)}{n!} \)), whatever method you use gives the Taylor series.
Example 4
Substitute \(-x^2\) into \(e^x\): \( e^{-x^2} = 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots \) for all \(x\).
Multiply \(\sin x\) by \(x\): \( x\sin x = x^2 - \frac{x^4}{3!} + \frac{x^6}{5!} - \cdots \).
6. Applications
Example 5 · Computing \(e\) to five decimals
At \(x = 1\): \( e = \sum\frac{1}{n!} \), and the remainder after the term \(\frac{1}{n!}\) is \( R_n = \frac{e^\theta}{(n+1)!} < \frac{3}{(n+1)!} \). We need \( \frac{3}{(n+1)!} < 0.000005 \), i.e. \( (n+1)! > 600\,000 \). Since \(10! = 3\,628\,800\), \(n = 9\) suffices:
\[ e \approx 1 + 1 + \frac12 + \frac16 + \frac1{24} + \cdots + \frac{1}{9!} \approx 2.71828. \]
Example 6 · Limits
\[ \lim_{x\to 0}\frac{\sin x - x}{x^3} = \lim_{x\to0}\frac{\big(x - \frac{x^3}{6} + \frac{x^5}{120} - \cdots\big) - x}{x^3} = \lim_{x\to0}\Big(-\frac16 + \frac{x^2}{120} - \cdots\Big) = -\frac16. \]
The series shows at a glance which terms matter: cancel what cancels, and the lowest surviving power decides the limit.
Example 7 · An integral with no elementary antiderivative
\( \int_0^1 e^{-x^2}\,dx \) cannot be computed with elementary functions, but term-by-term integration of Example 4 gives
\[ \int_0^1 e^{-x^2}\,dx = \sum_{n=0}^\infty \frac{(-1)^n}{n!\,(2n + 1)} = 1 - \frac13 + \frac1{10} - \frac1{42} + \frac1{216} - \frac1{1320} + \cdots \]
This is an alternating series with decreasing terms, so (Leibniz) stopping after \(\frac1{216}\) gives an error less than \( \frac{1}{1320} < 0.001 \):
\[ \int_0^1 e^{-x^2}\,dx \approx 0.747. \]
(The true value is \(0.74682\dots\)) This integral is the basis of the normal distribution tables in statistics.
7. Summary
Function
Maclaurin series
Valid for
\( e^x \)
\( \sum \frac{x^n}{n!} \)
all \(x\)
\( \sin x \)
\( \sum (-1)^{n-1}\frac{x^{2n-1}}{(2n-1)!} \)
all \(x\)
\( \cos x \)
\( \sum (-1)^n\frac{x^{2n}}{(2n)!} \)
all \(x\)
\( \frac{1}{1-x} \)
\( \sum x^n \)
\( -1 < x < 1 \)
\( (1+x)^\alpha \)
\( \sum\binom\alpha n x^n \)
\( (-1, 1) \); endpoints depend on \(\alpha\)
\( \ln(1+x) \)
\( \sum (-1)^{n-1}\frac{x^n}{n} \)
\( -1 < x \le 1 \)
\( \operatorname{arctg}x \)
\( \sum (-1)^n\frac{x^{2n+1}}{2n+1} \)
\( -1 \le x \le 1 \)
Radius of convergence: \( \frac1R = \limsup\sqrt[n]{|a_n|} \), or \( R = \lim\left|\frac{a_n}{a_{n+1}}\right| \). Taylor coefficients: \( a_n = \frac{f^{(n)}(a)}{n!} \). Convergence to \(f\): exactly when \( R_n(x) \to 0 \).
8. Practice problems
Try each one before opening the solution. More solved problems from this topic are in Series.
Problem 1: Find the interval of convergence of \( \displaystyle\sum_{n=1}^\infty \frac{n\,x^n}{2^n} \).
\( R = \lim\frac{n/2^n}{(n+1)/2^{n+1}} = 2 \). At \(x = \pm 2\) the terms are \( n(\pm1)^n \), which don't tend to zero. Interval: \( (-2, 2) \).
Problem 2: Find the interval of convergence of \( \displaystyle\sum_{n=1}^\infty \frac{(x + 1)^n}{n^2} \).
Centre \(-1\), \( R = \lim\frac{(n+1)^2}{n^2} = 1 \). At both endpoints \( \sum\frac{(\pm1)^n}{n^2} \) converges absolutely. Interval: \( [-2, 0] \).
Problem 3: Write the Maclaurin series of \( \cos(2x) \) and \( e^{3x} \).
\( \cos 2x = \sum (-1)^n\frac{4^nx^{2n}}{(2n)!} \), \( e^{3x} = \sum\frac{3^nx^n}{n!} \), both for all \(x\).
Problem 4: Find the Maclaurin series of \( \dfrac{1}{(1 - x)^2} \).
Differentiate \( \frac{1}{1-x} = \sum x^n \): \( \frac{1}{(1-x)^2} = \sum_{n=1}^\infty nx^{n-1} = \sum_{n=0}^\infty (n+1)x^n \), \(|x| < 1\). (Or use the binomial series with \(\alpha = -2\).)
\( e^x - 1 - x = \frac{x^2}{2} + \frac{x^3}{6} + \cdots \), so the limit is \( \frac12 \).
Problem 6: Compute \(\cos 0.2\) to four decimal places.
\( \cos 0.2 = 1 - \frac{0.04}{2} + \frac{0.0016}{24} - \cdots = 1 - 0.02 + 0.0000667 - \cdots \approx 0.98007 \). The next term is about \(9\cdot10^{-8}\), negligible. So \( \cos 0.2 \approx 0.9801 \).
Problem 7: Write the first four terms of the Maclaurin series of \( \dfrac{1}{\sqrt{1 - x}} \).
Binomial series with \( \alpha = -\frac12 \) and \(-x\) in place of \(x\): \( 1 + \frac12x + \frac38x^2 + \frac5{16}x^3 + \cdots \), \( -1 \le x < 1 \).
Problem 8: Why does the Maclaurin series of \( e^{-1/x^2} \) (with \(f(0) = 0\)) not represent the function?
All derivatives at \(0\) are zero, so the series is identically zero. Its remainder is \( R_n(x) = f(x) - 0 = e^{-1/x^2} \), which does not tend to zero for \(x \ne 0\). Having all derivatives is not enough; \(R_n \to 0\) is what matters.
Final thoughts
Power series turn complicated functions into something as simple as polynomials, at the price of infinitely many terms. Inside the interval of convergence you may treat them just like polynomials: add, multiply, differentiate, integrate. The Taylor series tells you which polynomial "is" your function, and the remainder tells you how many terms you need. That combination is why power series are at the heart of numerical computation, physics and engineering.