The Exponential Anti-hero

Any Taylor-based calculus joke links to the Taylor series. This is an incredibly powerful technique to approximate non-polynomial functions like \exp(x) \equiv e^x using polynomials.

For this post, we will establish the existence of a Taylor series centred at 0, known as a Maclaurin series.

Definition. Define the n-th derivative of f by

\displaystyle f^{(n)} := \begin{cases} f & \text{if}\, n = 0, \\ (f^{(n-1)})' & \text{if}\, n \geq 1. \end{cases}

Theorem 1 (Taylor’s Theorem). Suppose f : (-r, r) \to \mathbb R is a real-valued function that is n-times differentiable (that is, f^{(k)} exists for k=0,1,\dots,n on (-r, r)). Then for any x \in (0, r), there exists c \in (0, x) such that

\displaystyle f(x) = f(0) + f'(0)x + \cdots + \frac{f^{(n-1)}(0)}{(n-1)!} x^{n-1} + \frac{f^{(n)}(c)}{n!}x^{n}.

More concisely by using summation notation,

\displaystyle f(x) = \sum_{k=0}^{n-1} \frac{f^{(k)}(0)}{k!} x^k + \frac{f^{(n)}(c)}{n!} x^{n}.

Before we prove the result, we observe that the case n=1 is the vanilla mean value theorem. Furthermore, we actually need to use this special case to prove the general case.

Proof. Fix x \in (0, r). Define M by

\displaystyle M := \frac 1{x^n} \left(f(x) - \sum_{k=0}^{n-1} \frac{f^{(k)}(0)}{k!} x^k\right).

This ensures that

\displaystyle f(x) = \sum_{k=0}^{n-1} \frac{f^{(k)}(0)}{k!} x^k + M x^{n}.

Define the n-differentiable function g : [0, x] \to \mathbb R by

\displaystyle g(t) := f(t) - \left(\sum_{k=0}^{n-1} \frac{f^{(k)}(0)}{k!} t^k + Mt^n\right)

Direct substitutions yield g(0) = g'(0) = \cdots = g^{(n-1)}(0)= g(x) = 0. Apply the mean value theorem to g(0) = g(x) = 0 to find c_1 \in (0, x) such that

g'(0) = g'(c_1) = 0.

Apply the mean value theorem (n-2) more times to find c_{n-1} \in (0, x) such that

g^{(n-1)}(0) = g^{(n-1)}(c_{n-1}) = 0.

Apply the mean value theorem one last time to find c_n \in (0, c_{n-1}) \subseteq (0, c_n) \subseteq (0, x) such that

\displaystyle f^{(n)}(c_n) - n! M = g^{(n)}(c_n) = 0 \quad \iff \quad M = \frac{f^{(n)}(c_n)}{n!}.

Back-substituting yields

\displaystyle f(x) = \sum_{k=0}^{n-1} \frac{f^{(k)}(0)}{k!} x^k + \frac{f^{(n)}(c)}{n!} x^{n}.

To use this theorem we need to ensure that (f^{(n)}(c) / n!) x^{n} \to 0 as n \to \infty. One way that works is if there exists M > 0 such that for any n and for any t \in (-r, r), |f^{(n)}(t)| \leq M, since

\displaystyle \left|\frac{f^{(n)}(c)}{n!} x^{n}\right| \leq M \cdot \frac {r^n}{n!} \to 0,

where r^n / n! \to 0 can be established using real-analytic techniques. This works well in the case of the exponential function

Theorem 2. For any x \in \mathbb{R},

\displaystyle \exp(x) \equiv e^x = \sum_{k=0}^{\infty} \frac{x^k}{k!}.

This is the Maclaurin series of \exp.

Proof. We will suppose x > 0 for simplicity. Using \exp' = \exp, for any integer n \geq 0, f^{(n)}(0) = 1 and for any t \in (0, 2x), |f^{(n)}(t)| \leq e^{2x}.

Similarly, we can establish the Maclaurin series for \sin and \cos.

Theorem 3. For any x \in \mathbb{R},

\displaystyle \sin(x) = \sum_{k=0}^{\infty} \frac{{(-1)}^k x^{2k+1}}{(2k+1)!},\quad \cos(x) = \sum_{k=0}^{\infty} \frac{{(-1)}^k x^{k}}{(2k)!}.

Finally, we can formulate the general Taylor series based on the Maclaurin series.

Theorem 4 (Taylor’s Theorem). Suppose f : (a-r, a+r) \to \mathbb R is a real-valued function that is n-times differentiable. Then for any x \in (a, a+r), there exists c \in (a, x) such that

\displaystyle f(x) = \sum_{k=0}^{n-1} \frac{f^{(k)}(a)}{k!} (x-a)^k + \frac{f^{(n)}(c)}{n!} (x-a)^{n}.

Proof. Apply the vanilla Taylor’s theorem to the transformed function g:= f(\cdot + a) : (-r, r) \to \mathbb{R}.

—Joel Kindiak, 22 Oct 24, 1517H


Responses

  1. Calculus Recap (Polytechnic) – KindiakMath

    […] Solution. Differentiating twice, […]

    Like

  2. Verifying the Euler Method – KindiakMath

    […] Taylor’s theorem, there exists such […]

    Like

  3. A Doubly Taylor Theorem – KindiakMath

    […] Define . Apply Taylor’s theorem to find such […]

    Like

Leave a comment