DATA605 ASSIGNMENT 14
1 Question 1
This week, we’ll work out some Taylor Series expansions of popular functions.
- \(f(x) = \frac{1}{(1-x)}\)
- \(f(x) = e^{x}\)
- \(f(x) = ln(1+x)\)
For each function, only consider its valid ranges as indicated in the notes when you are computing the Taylor Series expansion. Please submit your assignment as a R-Markdown document.
1.1 Part (a)
\(f(x) = \frac{1}{(1-x)}\)
Answer:
\(f(x) = \frac{1}{(1-x)}\)
Compute the first four derivatives corresponding to the \(f(x)\) and their values at \(x=0\):
\(f'(x) = (-1)\cdot(1-x)^{-2}\cdot(-1) = (1-x)^{-2}\)
\(f'(0) = 1 = 1!\)
\(f''(x) = (-2)\cdot(1-x)^{-3}\cdot(-1) = 2!(1-x)^{-3}\)
\(f''(0) = 2!\)
\(f'''(x) = (2!)\cdot(-3)\cdot(1-x)^{-4}\cdot(-1) = 3!(1-x)^{-4}\)
\(f'''(0) = 3!\)
\(f''''(x) = (3!)\cdot(-4)\cdot(1-x)^{-5}\cdot(-1) = 4!(1-x)^{-5}\)
\(f''''(0) = 4!\)
Therefore, we have the Taylor Series expansions:
\(f(x) = (1-x)^{-1}\)
\(= \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^{n}\)
\(= f(0) + f'(0)x + f''(0)\frac{x^{2}}{2!} + f'''(0)\frac{x^{3}}{3!} + \cdots\)
\(= 1 + 1!\cdot x + 2!\cdot \frac{x^{2}}{2!} + 3!\cdot \frac{x^{3}}{3!} + 4!\cdot \frac{x^{4}}{4!} + \cdots\)
\(= 1 + x + x^{2} + x^{3} + x^{4} + \cdots\)
This function converges when \(|x|<1\).
1.2 Part (b)
\(f(x) = e^{x}\)
Answer:
\(f(x) = e^{x}\)
Compute the first four derivatives corresponding to the \(f(x)\) and their values at \(x=0\):
\(f'(x) = e^{x}\)
\(f'(0) = 1\)
\(f''(x) = e^{x}\)
\(f''(0) = 1\)
\(f'''(x) = e^{x}\)
\(f'''(0) = 1\)
\(f''''(x) = e^{x}\)
\(f''''(0) = 1\)
Therefore, we have the Taylor Series expansions:
\(f(x) = e^{x}\)
\(= \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^{n}\)
\(= f(0) + f'(0)x + f''(0)\frac{x^{2}}{2!} + f'''(0)\frac{x^{3}}{3!} + \cdots\)
\(= 1 + x + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + \frac{x^{4}}{4!} + \cdots\)
\(= \sum_{n=0}^{\infty} \frac{x^{n}}{n!}\)
This function converges for all \(x \in R\).
1.3 Part (c)
\(f(x) = ln(1+x)\)
Answer:
\(f(x) = ln(1+x)\)
Compute the first four derivatives corresponding to the \(f(x)\) and their values at \(x=0\):
\(f'(x) = (1+x)^{-1}\)
\(f'(0) = 1 = (-1)^{(1+1)} \cdot 0!\)
\(f''(x) = (-1) \cdot (1+x)^{-2}\)
\(f''(0) = -1 = (-1)^{(2+1)} \cdot 1!\)
\(f'''(x) = (-1) \cdot (-2) \cdot (1+x)^{-3}\)
\(f'''(0) = 2 = (-1)^{(3+1)} \cdot 2!\)
\(f''''(x) = (-1) \cdot (-2) \cdot (-3) (1+x)^{-4}\)
\(f''''(0) = -6 = (-1)^{(4+1)} \cdot 3!\)
Therefore, we have the Taylor Series expansions:
\(f(x) = ln(1+x)\)
\(= \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^{n}\)
\(= f(0) + f'(0)x + f''(0)\frac{x^{2}}{2!} + f'''(0)\frac{x^{3}}{3!} + \cdots\)
\(= 0 + 1 + (-1)\frac{x^{2}}{2!} + (2)\frac{x^{3}}{3!} + (-6)\frac{x^{4}}{4!} + \cdots\)
\(= \sum_{n=1}^{\infty} (-1)^{n+1}(n-1)!\frac{x^{n}}{n!}\)
\(= \sum_{n=1}^{\infty} \frac{(-1)^{n+1}\cdot x^{n}}{n}\)
This function converges for \(|x|<1\).