Data 605 HW 14

library(knitr)
library(rmdformats)

## Global options
options(max.print="85")
opts_chunk$set(cache=TRUE,
               prompt=FALSE,
               tidy=TRUE,
               comment=NA,
               message=FALSE,
               warning=FALSE)
opts_knit$set(width=35)

This week, we’ll work out some Taylor Series expansions of popular functions.

For each function, only consider its valid ranges as indicated in the notes when you are computing the Taylor Series expansion.

#1

f(x) = \(\frac{1}{1-x}\)

Ans:

f(0) = 1

f’(0) = \(\frac{1}{(1-0)^2} = 1\)

f’’(0) = \(-\frac{2}{(0-1)^3} = 2\)

Using the Maclaurin Series (Taylor series centered at 0), we get

\(\sum_{n=0}^{\infty }\frac{f^{(n)}(0)}{n!}(x^n) = f(0)+\frac{f'(0)}{1!}x+…+\frac{f^{(n)}(0)}{n!}x^n\)

\[ \begin{multline*} \begin{split} &= 1+ \frac{1}{1!}x+ \frac{2}{2!}x^2 + ... \\ &= 1+ x + x^2 + ... \\ \end{split} \end{multline*} \]
The series representation of this function is:

\(\sum_{n=0}^{\infty }x^n\) for |x| < 1

#2

f(x) = ex

Ans:

f(0) = e0 = 1

f’(0) = e0 = 1

f’’(0) = e0 = 1

Using the Maclaurin series (Taylor series at zero):

\(\sum_{n=0}^{\infty }\frac{f^{(n)}(0)}{n!}(x^n) = f(0)+\frac{f'(0)}{1!}x+…+\frac{f^{(n)}(0)}{n!}x^n\)

\[ \begin{multline*} \begin{split} &= 1+ \frac{1}{1!}x+ \frac{1}{2!}x^2 + \frac{1}{3!}x^3 +... \\ &= 1+ x + \frac{x^2}{2}+ \frac{x^3}{6} + ... \\ \end{split} \end{multline*} \]

The series representation of this function is:

\(\sum_{k=0}^{\infty }\frac{x^k}{k!}\)

#3

f(x) = ln(1+x)

Ans:

f(0) = ln(1+0) = ln(1)= 0

f’(0) = \(\frac{1}{1+0} = 1\)

f’’(0) = \(-\frac{1}{(1+0)^2}= -1\)

f’’’(0) = \(\frac{2}{(1+0)^3}=2\)

f(4)(0) = \(-\frac{6}{(1+0)^4} = -6\)

Using the Maclaurin series (Taylor series at zero):

\(\sum_{n=0}^{\infty }\frac{f^{(n)}(0)}{n!}(x^n) = f(0)+\frac{f'(0)}{1!}x+…+\frac{f^{(n)}(0)}{n!}x^n\)

\[ \begin{multline*} \begin{split} &= 0+ \frac{1}{1!}x+ \frac{(-1)}{2!}x^2 + \frac{2}{3!}x^3 + \frac{(-6)}{4!}x^4 +... \\ &= x - \frac{x^2}{2} + \frac{x^3}{3}- \frac{x^4}{4} + ... \\ \end{split} \end{multline*} \]

The series representation of this function is:

\(\sum_{k=1}^{\infty }\frac{(-1)^{k+1}x^k}{k}\)