Taylor's theorem

The essence of differentiation is to approximate an arbitrary function by a linear function. We can extend this idea by using higher-order derivatives to obtain better approximations.



Theorem (Taylor's theorem)

Let \(f(x)\) be a function of class \(C^{n}\) on an open interval \(I\). Let \(a \in I\). Then for all \(x \in I\), there exists \(c_x\) between \(x\) and \(a\) such that

\[ \begin{eqnarray} f(x) &=& f(a) + f'(a)(x-a) + \frac{1}{2}f''(a)(x-a)^2 + \cdots\nonumber\\ && + \frac{1}{(n-1)!}f^{(n)}(a)(x-a)^{n-1} + \frac{1}{n!}f^{(n)}(c_x)(x-a)^{n}.\nonumber\\ \label{eq:taylor} \end{eqnarray} \]

Proof. If \(x=a\), then we can set \(c_x = a\) and Eq. (eq:taylor) clearly holds.

Suppose \(b \in I\), \(b\neq a\). We need to show

\[ \begin{eqnarray} f(b) &=& f(a) + f'(a)(b-a) + \frac{1}{2}f''(a)(b-a)^2 + \cdots\nonumber\\ && + \frac{1}{(n-1)!}f^{(n-1)}(a)(b-a)^{n-1} + \frac{1}{n!}f^{(n)}(c_b)(b-a)^{n}.\nonumber\\ && \label{eq:taylorb} \end{eqnarray} \]

for some \(c_b\). Let us define the constant \(A\) by

\[ A(b-a)^{n} = f(b) - \left[f(a) + f'(a)(b-a) + \cdots +\frac{1}{(n-1)!}f^{(n-1)}(a)(b-a)^{n-1}\right] \]

and the function \(g(x)\) on \(I\) by

\[ g(x) = f(b) - \left[f(x) + f'(x)(b-x) + \cdots + \frac{1}{(n-1)!}f^{(n-1)}(x)(b-x)^{n-1} + A(b-x)^{n}\right]. \]

\(g(x)\) is a differentiable function on \(I\) and \(g(a) = g(b) = 0\). Thus, by Rolle's theorem, there exists \(c_b\) between \(a\) and \(b\) such that \(g'(c_b) = 0\).

[See also: Mean Value Theorem for Rolle's theorem.]

Let us calculate \(g'(x)\). Noting that, for \(k \geq 1\),

\[\left[\frac{1}{k!}f^{(k)}(x)(b-x)^k\right]' = \frac{1}{k!}f^{(k+1)}(x)(b-x)^k - \frac{1}{(k-1)!}f^{(k)}(x)(b-x)^{k-1},\]

the first several terms of \(g'(x)\) are

\[-f'(x) +f'(x) - f''(x)(b-x) + f''(x)(b-x) - \frac{1}{2}f'''(x)(b-x)^2 + \cdots\]

so that most terms are canceled. After all, we have

\[ g'(x) = -\frac{1}{(n-1)!}f^{(n)}(x)(b-x)^{n-1} + nA(b-x)^{n-1}. \]

Since \(g'(c_b) = 0\), we have

\[ 0 = -\frac{1}{(n-1)!}f^{(n)}(c_b)(b-c_b)^{n-1} + nA(b-c_b)^{n-1} \]

or

\[ A = \frac{1}{n!}f^{(n)}(c_b). \]

Substituting this \(A\) into \(g(a) = 0\), we have Eq. (eq:taylorb). ■

Let's see what Taylor's theorem means. Let us define the polynomial of degree \(n\) by

\[ P_n(x) = f(a) + f'(a)(x-a) + \frac{1}{2}f''(a)(x-a)^2 +\cdots + \frac{1}{n!}f^{(n)}(a)(x-a)^{n}. \]

Taylor's theorem states that the difference between \(f(x)\) and \(P_{n}(x)\) is given by

\[ f(x) - P_{n}(x) = \frac{1}{(n+1)!}f^{(n+1)}(c_x)(x-a)^{n+1} \]

for some \(c_n\). If \(n\) is sufficiently large and \(x\) is close to \(a\) (i.e., \(|x - a|\) is small), then \(|(x-a)^{n+1}|\) is very small so that the above difference is very small. Thus, Taylor's theorem indicates that the function \(f(x)\) can be approximated by polynomial functions.

Example. Consider \(f(x) = \sin x\). With \(a = 0\), we have

\[ \begin{eqnarray} P_1(x) &=& x,\\ P_3(x) &=& x - \frac{1}{6}x^3,\\ P_5(x) &=& x - \frac{1}{6}x^3 + \frac{1}{120}x^5,\\ &\vdots& \end{eqnarray} \]

By plotting the graphs of these polynomials, we can see that they approximate \(\sin x\) with increasingly better accuracies.

Approximation of \(sin x\) by Taylor expansions.

Definition (finite Taylor expansion and finite Maclaurin expansion)

The right-hand side of Eq. (eq:taylor) in Taylor's Theorem is called the finite Taylor expansion and the last term \(\frac{1}{n!}f^{(n)}(c_x)(x-a)^n\) is called the remainder or residual. The finite Taylor expansion can be also expressed as

\[f(x) = \sum_{k=0}^{n-1}\frac{1}{k!}f^{(k)}(a)(x-a)^k + \frac{1}{n!}f^{(n)}(a + \theta(x-a))(x-a)^n\]

where \(\theta\in (0,1)\) is a constant dependent on \(x\).

In particular, the finite Taylor expansion with \(a=0\) is called the finite Maclaurin expansion

Example. The finite Maclaurin expansion of \(e^x\) is given by

\[e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{3!} + \cdots + \frac{x^{n-1}}{(n-1)!} + \frac{e^{\theta x}x^n}{n!}.\]

(Exercise!) □

Example. The finite Maclaurin expansion of \(\log(x+1)\) is given by

\[\log(x+1) = x - \frac{1}{2}x^2 + \frac{1}{3}x^3 - \frac{1}{4}x^4 + \cdots + \frac{(-1)^n}{(n-1)}x^{n-1} + \frac{(-1)^{n+1}x^n}{n(\theta x + 1)^n}.\]

(Exercise!) □

Comments

Popular posts from this blog

Open sets and closed sets in \(\mathbb{R}^n\)

Euclidean spaces

Applications of multiple integrals