Taylor Series
1 Taylor polynomials and series
Definition 1 (Taylor polynomial (Taylor expansion)) Let \(f\) be a function that has at least \(n\) derivatives at a point \(x_0\). The Taylor polynomial (also called the Taylor expansion) of degree \(n\) for \(f\) centered at \(x_0\) is:
\[ \begin{aligned} P_n(x) &= \sum_{k=0}^n \frac{f^{(k)}(x_0)}{k!}(x - x_0)^k \\ &= f(x_0) + f'(x_0)(x - x_0) + \frac{f''(x_0)}{2!}(x - x_0)^2 + \dots + \frac{f^{(n)}(x_0)}{n!}(x - x_0)^n \end{aligned} \tag{1}\]
Example 1 (Taylor series of the exponential function) For \(f(x) = e^x\) centered at \(x_0 = 0\), every derivative is
\[ \begin{aligned} f^{(k)}(0) &= e^0 \\ &= 1. \end{aligned} \]
The degree-\(n\) Maclaurin polynomial is:
\[ \begin{aligned} P_n(x) &= 1 + x + \frac{x^2}{2!} + \dots + \frac{x^n}{n!} \\ &= \sum_{k=0}^n \frac{x^k}{k!} \end{aligned} \]
Because the remainder \(R_n(x) \to 0\) as \(n \to \infty\) for all \(x \in \mathbb{R}\), the Taylor series converges everywhere to \(e^x\):
\[e^x = \sum_{k=0}^\infty \frac{x^k}{k!}\]
Definition 2 (Maclaurin polynomial) When \(x_0 = 0\), the Taylor polynomial \(P_n(x)\) (Definition 1) is called the Maclaurin polynomial.
Definition 3 (Taylor series) Let \(f\) and \(x_0\) be as in Definition 1. When \(f\) is infinitely differentiable and the series converges to \(f(x)\) on an open interval containing \(x_0\), the infinite sum \(\sum_{k=0}^\infty \frac{f^{(k)}(x_0)}{k!}(x - x_0)^k\) is the Taylor series of \(f\) centered at \(x_0\).
Chapter 11 of the Essence of calculus series by 3Blue1Brown develops the geometric and polynomial intuition behind Taylor approximations:
- Taylor series shows how higher-order derivatives match the curvature and rate of change of a function near a point to build polynomial approximations (Definition 1).
2 Polynomials, exponentials and trigonometric functions
Exercise 1 (Taylor polynomial of a polynomial at the origin) Adapted from Miller [1], Question 1.1.16.
Find the first five terms (up to degree 4) of the Taylor series for
\[f(x) = x^8 + x^4 + 3\]
at \(x_0 = 0\).
Exercise 2 (Taylor expansion of a polynomial at a nonzero point) Adapted from Miller [1], Question 1.1.17.
Find the first three terms (up to degree 2) of the Taylor series for
\[f(x) = x^8 + x^4 + 3\]
at \(x_0 = 1\).
Example 2 (Taylor series of the cosine function) For \(f(x) = \cos x\) centered at \(x_0 = 0\), the derivatives follow a repeating cycle of length 4:
\[\begin{aligned} f(0) &= \cos(0) \\ &= 1, \\ f'(0) &= -\sin(0) \\ &= 0, \\ f''(0) &= -\cos(0) \\ &= -1, \\ f'''(0) &= \sin(0) \\ &= 0, \end{aligned}\]
and in general \(f^{(2k)}(0) = (-1)^k\) and \(f^{(2k+1)}(0) = 0\) for all \(k \ge 0\). The Taylor series (Maclaurin series) converges everywhere to \(\cos x\):
\[ \begin{aligned} \cos x &= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \dots \\ &= \sum_{k=0}^\infty \frac{(-1)^k}{(2k)!}x^{2k} \end{aligned} \]
Example 3 (Taylor series of the sine function) For \(f(x) = \sin x\) centered at \(x_0 = 0\), the derivatives evaluate at \(0\) to \(f^{(2k)}(0) = 0\) and \(f^{(2k+1)}(0) = (-1)^k\) for all \(k \ge 0\). The Taylor series converges everywhere to \(\sin x\):
\[ \begin{aligned} \sin x &= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \dots \\ &= \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)!}x^{2k+1} \end{aligned} \]
Exercise 3 (Taylor expansion of a scaled cosine) Adapted from Miller [1], Question 1.1.18.
Find the terms up to degree 4 in the Taylor series for
\[f(x) = \cos(5x)\]
at \(x_0 = 0\).
Exercise 4 (Taylor series of a power of a function) Adapted from Miller [1], Question 1.1.19.
Find the terms up to degree 4 in the Taylor series for
\[f(x) = \cos^3(5x)\]
at \(x_0 = 0\).
Exercise 5 (Linear Taylor polynomial of the exponential) Adapted from Miller [1], Question 1.1.20.
Find the first two terms (degree 1) of the Taylor series for
\[f(x) = e^x\]
at \(x_0 = 0\).
Exercise 6 (Taylor series of a composite exponential) Adapted from Miller [1], Question 1.1.21.
Find the first six terms (up to degree 5) of the Taylor series for
\[f(x) = {\operatorname{exp}\mathopen{}\left\{x^8\right\}\mathclose{}}\]
at \(x_0 = 0\).
3 Roots, logarithms and compound functions
Exercise 7 (Taylor expansion of the normal density) Adapted from Miller [1], Question 1.1.22.
Find the terms up to degree 3 of the Taylor series for the standard normal density
\[\phi(x) = \frac{1}{\sqrt{2\pi}}{\operatorname{exp}\mathopen{}\left\{-\frac{x^2}{2}\right\}\mathclose{}}\]
at \(x_0 = 0\).
Theorem 1 (Maclaurin polynomial of the standard normal density) The Maclaurin polynomial (Definition 2) of degree 3 of the standard normal density \(\phi(x) = \frac{1}{\sqrt{2\pi}}{\operatorname{exp}\mathopen{}\left\{-\frac{x^2}{2}\right\}\mathclose{}}\) is
\[P_3(x) = \frac{1}{\sqrt{2\pi}} - \frac{x^2}{2\sqrt{2\pi}}\]
Proof. This is the solution to Exercise 7, worked in Solution 7.
Exercise 8 (Taylor expansion of the square root) Adapted from Miller [1], Question 1.1.23.
Find the first three terms (up to degree 2) of the Taylor series for
\[f(x) = \sqrt{x}\]
at \(x_0 = 1/3\).
Exercise 9 (Taylor expansion of a fractional power) Adapted from Miller [1], Question 1.1.24.
Find the first three terms of the Taylor series for
\[f(x) = (1 + x)^{1/3}\]
at \(x_0 = 1/2\).
Exercise 10 (Taylor expansion of \(x \log x\)) Adapted from Miller [1], Question 1.1.25.
Find the first three terms (up to degree 2) of the Taylor series for
\[f(x) = x\log x\]
at \(x_0 = 1\).
Exercise 11 (Maclaurin series of \(\log(1 + x)\)) Adapted from Miller [1], Question 1.1.26.
Find the first three terms of the Taylor series for
\[f(x) = \log(1 + x)\]
at \(x_0 = 0\).
Theorem 2 (Maclaurin polynomial of \(\log(1 + x)\)) The Maclaurin polynomial (Definition 2) of degree 3 of \(f(x) = \log(1 + x)\) is
\[P_3(x) = x - \frac{x^2}{2} + \frac{x^3}{3}\]
Proof. This is the solution to Exercise 11, worked in Solution 11.
Exercise 12 (Maclaurin series of \(\log(1 - x)\)) Adapted from Miller [1], Question 1.1.27.
Find the terms up to degree 3 of the Taylor series for
\[f(x) = \log(1 - x)\]
at \(x_0 = 0\).
Theorem 3 (Maclaurin polynomial of \(\log(1 - x)\)) The Maclaurin polynomial (Definition 2) of degree 3 of \(f(x) = \log(1 - x)\) is
\[P_3(x) = -x - \frac{x^2}{2} - \frac{x^3}{3}\]
Proof. This is the solution to Exercise 12, worked in Solution 12.
Exercise 13 (Taylor series of \(\log((1 - x)e^x)\)) Adapted from Miller [1], Question 1.1.28.
Find the first two non-zero terms of the Taylor series for
\[f(x) = \log((1 - x)e^x)\]
at \(x_0 = 0\).
Exercise 14 (Taylor series of a product of known expansions) Adapted from Miller [1], Question 1.1.29.
Find the terms up to degree 2 of the Taylor series for
\[f(x) = \cos(x)\log(1 + x)\]
at \(x_0 = 0\).
Exercise 15 (Taylor series of \(\log(1 + 2x)\)) Adapted from Miller [1], Question 1.1.30.
Find the first two non-zero terms of the Taylor series for
\[f(x) = \log(1 + 2x)\]
at \(x_0 = 0\).