Taylor Series



Final exam: Wednesday, March 22, 7-10pm in PCYNH 109. Bring ID!
Last Quiz 4: This Friday
Next: 11.10 Taylor and Maclaurin series
Next: 11.12 Applications of Taylor Polynomials
Midterm Letters:
A, 32-38
B, 26-31
C, 20-25
D, 14-19
Mean: 23.4, Standard Deviation: 7.8, High: 38, Low: 6.

Example 6.6.1   Suppose we have a degree-$ 3$ (cubic) polynomial $ p$ and we know that $ p(0) = 4$, $ p'(0)=3$, $ p''(0)=4$, and $ p'''(0)=6$. Can we determine $ p$? Answer: Yes! We have

$\displaystyle p(x)$ $\displaystyle = a + bx + cx^2 + dx^3$    
$\displaystyle p'(x)$ $\displaystyle = b + 2cx + 3dx^2$    
$\displaystyle p''(x)$ $\displaystyle = 2c + 6dx$    
$\displaystyle p'''(x)$ $\displaystyle = 6d$    

From what we mentioned above, we have:

$\displaystyle a$ $\displaystyle = p(0) = 4$    
$\displaystyle b$ $\displaystyle = p'(0) = 3$    
$\displaystyle c$ $\displaystyle = \frac{p''(0)}{2} = 2$    
$\displaystyle d$ $\displaystyle = \frac{p'''(0)}{6} = 1$    

Thus

$\displaystyle p(x) = 4 + 3x + 2x^2 + x^3.
$

Amazingly, we can use the idea of Example [*] to compute power series expansions of functions. E.g., we will show below that

$\displaystyle e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}.
$

Convergent series are determined by the values of their derivatives.

Consider a general power series

$\displaystyle f(x) = \sum_{n=0}^{\oo } c_n (x-a)^n = c_0 + c_1 (x-a) + c_2 (x-a)^2 + \cdots
$

We have

$\displaystyle c_0$ $\displaystyle = f(a)$    
$\displaystyle c_1$ $\displaystyle = f'(a)$    
$\displaystyle c_2$ $\displaystyle = \frac{f''(a)}{2}$    
$\displaystyle \cdots$    
$\displaystyle c_n$ $\displaystyle = \frac{f^{(n)}(a)}{n!},$    

where for the last equality we use that

$\displaystyle f^{(n)}(x) = n! c_n + (x-a)(\cdots + \cdots)
$

Remark 6.6.2   The definition of $ 0!$ is $ 1$ (it's the empty product). The empty sum is 0 and the empty product is $ 1$.

Theorem 6.6.3 (Taylor Series)   If $ f(x)$ is a function that equals a power series centered about $ a$, then that power series expansion is

$\displaystyle f(x)$ $\displaystyle = \sum_{n=0}^{\oo } \frac{f^{(n)}(a)}{n!} (x-a)^n$    
  $\displaystyle = f(a) + f'(a)(x-a) + \frac{f''(a)}{2} (x-a)^2 + \cdots$    

Remark 6.6.4   WARNING: There are functions that have all derivatives defined, but do not equal their Taylor expansion. E.g., $ f(x) = e^{-1/x^2}$ for $ x\neq 0$ and $ f(0)=0$. It's Taylor expansion is the 0 series (which converges everywhere), but it is not the 0 function.

Definition 6.6.5 (Maclaurin Series)   A Maclaurin series is just a Taylor series with $ a=0$. I will not use the term ``Maclaurin series'' ever again (it's common in textbooks).

Example 6.6.6   Find the Taylor series for $ f(x)=e^x$ about $ a=0$. We have $ f^{(n)}(x) = e^x$. Thus $ f^{(n)}(0) = 1$ for all $ n$. Hence

$\displaystyle e^x = \sum_{n=0}^{\oo } \frac{1}{n!} x^n = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots
$

What is the radius of convergence? Use the ratio test:

$\displaystyle \lim_{n\to\infty} \left\vert \frac{ \frac{1}{(n+1)!} x^{n+1}}{ \frac{1}{n!} x^n} \right\vert$ $\displaystyle = \lim_{n\to\infty} \frac{n!}{(n+1)!}\vert x\vert$    
  $\displaystyle = \lim_{n\to\infty} \frac{\vert x\vert}{n+1} = 0,$   for any fixed $ x$$\displaystyle .
$    

Thus the radius of convergence is $ \oo $.

Example 6.6.7   Find the Taylor series of $ f(x)=\sin(x)$ about $ x=\frac{\pi}{2}$.6.1 We have

$\displaystyle f(x) = \sum_{n=0}^{\oo } \frac{f^{(n)}\left(\frac{\pi}{2}\right)}{n!}
\left(x - \frac{\pi}{2}\right)^n.
$

To do this we have to puzzle out a pattern:

$\displaystyle f(x)$ $\displaystyle = \sin(x)$    
$\displaystyle f'(x)$ $\displaystyle = \cos(x)$    
$\displaystyle f''(x)$ $\displaystyle = -\sin(x)$    
$\displaystyle f'''(x)$ $\displaystyle = -\cos(x)$    
$\displaystyle f^{(4)}(x)$ $\displaystyle = \sin(x)$    

First notice how the signs behave. For $ n=2m$ even,

$\displaystyle f^{(n)}(x) = f^{(2m)}(x) = (-1)^{n/2} \sin(x)
$

and for $ n=2m+1$ odd,

$\displaystyle f^{(n)}(x) = f^{(2m+1)}(x) = (-1)^{m} \cos(x) = (-1)^{(n-1)/2} \cos(x)
$

For $ n=2m$ even we have

$\displaystyle f^{(n)}(\pi/2) = f^{(2m)}\left(\frac{\pi}{2}\right) = (-1)^m.
$

and for $ n=2m+1$ odd we have

$\displaystyle f^{(n)}(\pi/2) = f^{(2m+1)}\left(\frac{\pi}{2}\right) = (-1)^m\cos(\pi/2) = 0.
$

Finally,

$\displaystyle \sin(x)$ $\displaystyle = \sum_{n=0}^{\infty} \frac{f^{(n)}(\pi/2)}{n!}(x-\pi/2)^n$    
  $\displaystyle = \sum_{m=0}^{\infty} \frac{(-1)^{m}}{(2m)!} \left(x - \frac{\pi}{2}\right)^{2m}.$    

Next we use the ratio test to compute the radius of convergence. We have

$\displaystyle \lim_{m\to\infty} \frac{\displaystyle \left\vert \frac{(-1)^{m+1}...
...ft\vert \frac{(-1)^{m}}{(2m)!} \left(x - \frac{\pi}{2}\right)^{2m} \right\vert}$ $\displaystyle = \lim_{m\to\infty} \frac{(2m)!}{(2m+2)!} \left(x-\frac{\pi}{2}\right)^2$    
  $\displaystyle = \lim_{m\to\infty} \frac{\left(x-\frac{\pi}{2}\right)^2}{(2m+2)(2m+1)}$    

which converges for each $ x$. Hence $ R=\infty$.

Example 6.6.8   Find the Taylor series for $ \cos(x)$ about $ a=0$. We have $ \cos(x) = \sin\left(x+\frac{\pi}{2}\right)$. Thus from Example [*] (with infinite radius of convergence) and that the Taylor expansion is unique, we have

$\displaystyle \cos(x)$ $\displaystyle = \sin\left(x+\frac{\pi}{2}\right)$    
  $\displaystyle = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n)!} \left(x + \frac{\pi}{2} - \frac{\pi}{2}\right)^{2n}$    
  $\displaystyle = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n)!} x^{2n}$    

William Stein 2006-03-15