PAGE 1

11.4 Working with Taylor Series

Taylor Series Definition

The Taylor series for a function \( f(x) \) centered at \( a \) is defined as:

\[ f(x) = \sum_{k=0}^{\infty} \frac{f^{(k)}(a)}{k!} (x-a)^k \]
\[ = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!} (x-a)^2 + \frac{f'''(a)}{3!} (x-a)^3 + \dots \]

Any differentiable \( f(x) \) near \( x=a \) can be expressed as a Taylor series.

If \( a=0 \), Taylor \( \rightarrow \) Maclaurin

Usually we work with "model" Maclaurin series.

PAGE 2

Common Maclaurin Series

\( a=0 \) only

\[ \frac{1}{1-x} = 1 + x + x^2 + \dots + x^k + \dots = \sum_{k=0}^{\infty} x^k, \quad \text{for } |x| < 1 \]
\[ \frac{1}{1+x} = 1 - x + x^2 - \dots + (-1)^k x^k + \dots = \sum_{k=0}^{\infty} (-1)^k x^k, \quad \text{for } |x| < 1 \]
\[ e^x = 1 + x + \frac{x^2}{2!} + \dots + \frac{x^k}{k!} + \dots = \sum_{k=0}^{\infty} \frac{x^k}{k!}, \quad \text{for } |x| < \infty \]
\[ \sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \dots + \frac{(-1)^k x^{2k+1}}{(2k+1)!} + \dots = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k+1}}{(2k+1)!}, \quad \text{for } |x| < \infty \]
\[ \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \dots + \frac{(-1)^k x^{2k}}{(2k)!} + \dots = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k}}{(2k)!}, \quad \text{for } |x| < \infty \]
\[ \ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \dots + \frac{(-1)^{k+1} x^k}{k} + \dots = \sum_{k=1}^{\infty} \frac{(-1)^{k+1} x^k}{k}, \quad \text{for } -1 < x \le 1 \]
\[ -\ln(1-x) = x + \frac{x^2}{2} + \frac{x^3}{3} + \dots + \frac{x^k}{k} + \dots = \sum_{k=1}^{\infty} \frac{x^k}{k}, \quad \text{for } -1 \le x < 1 \]
\[ \tan^{-1} x = x - \frac{x^3}{3} + \frac{x^5}{5} - \dots + \frac{(-1)^k x^{2k+1}}{2k+1} + \dots = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k+1}}{2k+1}, \quad \text{for } |x| \le 1 \]
\[ \sinh x = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \dots + \frac{x^{2k+1}}{(2k+1)!} + \dots = \sum_{k=0}^{\infty} \frac{x^{2k+1}}{(2k+1)!}, \quad \text{for } |x| < \infty \]
\[ \cosh x = 1 + \frac{x^2}{2!} + \frac{x^4}{4!} + \dots + \frac{x^{2k}}{(2k)!} + \dots = \sum_{k=0}^{\infty} \frac{x^{2k}}{(2k)!}, \quad \text{for } |x| < \infty \]
PAGE 3

Example: Maclaurin Series

Find the Maclaurin series for the function:

\[ f(x) = \frac{9 \tan^{-1} x - 9x + 3x^3}{5x^5} \]

Build from a table of "model" series:

\[ \tan^{-1} x = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \frac{x^9}{9} - \dots \]

Multiply by 9:

\[ 9 \tan^{-1} x = 9x - 3x^3 + \frac{9}{5}x^5 - \frac{9}{7}x^7 + \frac{9}{9}x^9 - \dots \]

Subtract \( 9x \):

\[ 9 \tan^{-1} x - 9x = -3x^3 + \frac{9}{5}x^5 - \frac{9}{7}x^7 + \frac{9}{9}x^9 - \dots \]

Add \( 3x^3 \):

\[ 9 \tan^{-1} x - 9x + 3x^3 = \frac{9}{5}x^5 - \frac{9}{7}x^7 + \frac{9}{9}x^9 - \frac{9}{11}x^{11} + \dots \]

Divide by \( 5x^5 \):

\[ \frac{9 \tan^{-1} x - 9x + 3x^3}{5x^5} = \frac{9}{5 \cdot 5} - \frac{9}{5 \cdot 7}x^2 + \frac{9}{5 \cdot 9}x^4 - \frac{9}{5 \cdot 11}x^6 + \frac{9}{5 \cdot 13}x^8 - \dots \]
\[ = \frac{9}{5} \left( \frac{1}{5} - \frac{x^2}{7} + \frac{x^4}{9} - \frac{x^6}{11} + \frac{x^8}{13} - \frac{x^{10}}{15} + \dots \right) \]

Choose to start at \( k = 0 \):

\[ = \frac{9}{5} \sum_{k=0}^{\infty} (-1)^k \frac{x^{2k}}{2k+5} \]

Near \( x = 0 \), this behaves like \( f(x) \).

PAGE 4

How to use that?

1. Evaluating Limits

Consider the limit:

\[ \lim_{x \to 0} \frac{9 \tan^{-1} x - 9x + 3x^3}{5x^5} \]

Usually we use l'Hospital's Rule. However, \( \lim_{x \to 0} \) implies \( x \) is near 0, so the Maclaurin series can be used in place of \( f(x) \).

\[ = \lim_{x \to 0} \frac{9}{5} \left( \frac{1}{5} - \frac{x^2}{7} + \frac{x^4}{9} - \dots \right) = \frac{9}{25} \]

Note: Higher order terms approach 0 as \( x \to 0 \).

2. Integration

Another good use: integration near \( x = 0 \).

\[ \int_{0}^{1} \frac{9 \tan^{-1} x - 9x + 3x^3}{5x^5} dx \]
\[ = \int_{0}^{1} \frac{9}{5} \left( \frac{1}{5} - \frac{x^2}{7} + \frac{x^4}{9} - \frac{x^6}{11} + \dots \right) dx \]
\[ = \frac{9}{5} \left. \left( \frac{1}{5}x - \frac{x^3}{3 \cdot 7} + \frac{x^5}{5 \cdot 9} - \frac{x^7}{7 \cdot 11} + \frac{x^9}{9 \cdot 13} - \frac{x^{11}}{11 \cdot 15} + \dots \right) \right|_{0}^{1} \]
PAGE 5
\[ = \frac{9}{5} \left( \frac{1}{5} - \frac{1}{21} + \frac{1}{45} \mid - \frac{1}{77} + \frac{1}{117} - \dots \right) \]

Let's cut off after \( \frac{1}{45} \). The first three terms are the approx. of the integral.

\[ \int_{0}^{1} \frac{9 \tan^{-1} x - 9x + 3x^3}{5x^5} dx \approx \frac{9}{5} \left( \frac{1}{5} - \frac{1}{21} + \frac{1}{45} \right) \approx 0.3143 \]

What is the |error|?

One option: Taylor's Remainder Theorem

Easier: Alternating Series Estimation (because this happens to be an alt. series)

\[ |\text{error}| \leq |\text{first term we throw out}| \]\[ \leq \left| \frac{9}{5} \cdot - \frac{1}{77} \right| \approx 0.0234 \]
PAGE 6

Example: Estimate Integral

Estimate \( \int_{0}^{0.1} e^{-x^2} dx \) to within \( 10^{-8} \).

Near 0 \( \rightarrow \) Maclaurin is good.

\[ e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \dots \]\[ e^{-x^2} = 1 + (-x^2) + \frac{(-x^2)^2}{2!} + \dots \]\[ = 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \frac{x^8}{4!} - \frac{x^{10}}{5!} + \dots \]
\[ \int_{0}^{0.1} e^{-x^2} dx = \int_{0}^{0.1} \left( 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \frac{x^8}{4!} - \frac{x^{10}}{5!} + \dots \right) dx \]\[ = \left[ x - \frac{x^3}{3} + \frac{x^5}{5 \cdot 2!} - \frac{x^7}{7 \cdot 3!} + \frac{x^9}{9 \cdot 4!} - \frac{x^{11}}{11 \cdot 5!} + \frac{x^{13}}{13 \cdot 6!} - \dots \right]_{0}^{0.1} \]
PAGE 7

Approximating Integrals with Alternating Series

\[ = 0.1 - \frac{(0.1)^3}{3} + \frac{(0.1)^5}{5 \cdot 2!} - \frac{(0.1)^7}{7 \cdot 3!} + \frac{(0.1)^9}{9 \cdot 4!} - \dots \]

Alternating Series Estimation Theorem:

  • \(|\text{error}| \leq |\text{first term we throw out}|\)
  • Goal: \(|\text{error}| \leq 10^{-8}\)

Term Analysis:

  • \(\frac{(0.1)^3}{3} \approx 3 \times 10^{-4}\)
  • \(\frac{(0.1)^5}{5 \cdot 2!} = 10^{-6}\)
  • \(\frac{(0.1)^7}{7 \cdot 3!} \approx 2.38 \times 10^{-9}\)

First time below \(10^{-8}\), so sum up to the term before it.

\[ \approx 0.1 - \frac{(0.1)^3}{3} + \frac{(0.1)^5}{5 \cdot 2!} \approx 0.099068 \approx \int_{0}^{0.1} e^{-x^2} dx \text{ (to within } 10^{-8}) \]

Comparison of Integrals

\[ \int e^{-x} dx = -e^{-x} + C \]

\[ \int e^{-x^2} dx = \text{cannot be expressed using elementary functions in closed form} \]

PAGE 8

Sum of the Alternating Harmonic Series

\[ 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \frac{1}{7} - \frac{1}{8} + \dots \]

Alt. Harmonic converges.

\(= S\) (sum of this series) has a sum because it converges.

\(S = ?\)

Using Power Series Tables

From Table: \(\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \frac{x^5}{5} - \dots\)

This is the alternating harmonic series if \(x = 1\).

\[ \ln(1+1) = 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \dots = \ln(2) \]
\[ S = \ln(2) \]