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. Please submit your assignment as a R-Markdown document.
Let’s remember that \(P(x) = \sum_{n=0}^\infty \frac{f^{(n)}(c)}{n!}(x-c)^n\)
#1
\[ f(x) = (1-x)^{-1} \\ f'(x) = -1(1-x)^{-2}(-1) \\ f'(x) = (1-x)^{-2} \]
\[ f''(x) = -2(1-x)^{-3}(-1) \\ f''(x) = 2(1-x)^{-3} \]
\[ f'''(x)=-6(1-x)^{-4}(-1) \\ f'''(x)=6(1-x)^{-4} \]
\[ f^{(4)}(x)=-24(1-x)^{-5}(-1) \\ f'''(x)=24(1-x)^{-5} \]
Next we plug these into the taylor pollynomial, specifically the Maclaurin one with c set 0.
\[ P(0)= \frac{(1-x)^{-1}}{0!}x^0 + \frac{2(1-x)^{-3}}{1!}x^1 \frac{6(1-x)^{-4}}{2!}x^2 + \frac{24(1-x)^{-5}}{3!}x^3 \]
Evaluating these at \(f(0)\) gives:
Compare these to the factorials:
library(knitr)
nums <- c(0:4)
facts <- factorial(nums)
tab <- data.frame(facts)
tab <- t(tab)
colnames(tab) = c(0:4)
tab
## 0 1 2 3 4
## facts 1 1 2 6 24
Thus, we can see that \(P(0) = x^0 + x^1+x^2+x^3\) Because all the coefficents go to one.
The range is all non-negative numbers.
The derivative of \(e^x\) is \(e^x\). Therefore: \[ P(0) = \frac{e^x}{0!} + \frac{e^x}{1!}x + \frac{e^x}{2!}x^2 + \frac{e^x}{3!}x^3 \] \(f(0) = 1 \quad \forall \quad f^{n}(0)\)
So the sequence is \(\sum_{n=0}^\infty \frac{x^n}{n!}\)
The range is all non-negative numbers.
\[ f(x)=ln(1+x) \\ f'(x)=(1+x)^{-1} \\ f''(x)=-(1+x)^{-2} \\ f'''(x)=2(1+x)^{-3} \\ f^{4}(x)=-6(1+x)^{-4} \]
Evaluated at\(f(0)\), they equal 0, 1, -1, 2, -6.
\[ P(0)= 0 + \frac{1}{1!}x^{1}-\frac{1}{2!}x^{2} + \frac{2}{3!}x^{3} - \frac{6}{4!}x^{4} \]
Thus,
\[ \sum_{n=1}^\infty=(-1)^{n+1} \frac{x^n}{n} \]
For all positive numbers.