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 an R- Markdown document.
Using Key ideas in 8.8.1 I know the interval for this function is from (-1,1) The first few terms are 1+x+x^2 +x^3 +…. \[ f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(c)}{n!}(x - c)^n \]
I can find the derivatives and plug in 0 for c as the center between the intervals 1/ (x-1) can also be written as (x-1)^-1; f(0) = (0-1) ^-1= -1^-1 = 1
The first derivative is -1 (1-x)^-2; f’’(0) = -1(1)^-2 = -1
The Second derivative 2(-1)(1-x)^-3; f’’’(0)= -2(1)^-3 = -2
The third derivative is 3(2)(-1)(1-x)^-4; f’’’’(0) = -6 (1-0)^-4 = -6
The expansion can be written as f(x)= 1- x - 2x^2 - 6x^3
Since the common ratio is -x it can also be written as : \[ f(x) = \sum_{n=0}^{\infty} (-1)^n x^n \]
Based on the reading the interval of convergence is negative infinity to infinity.
f(x) e^x, the first, second and third derivative are also e^x because it is its own derivative, if I evaluate the f(x) and its derivatives at c=0 then e^0 is 1 for all the values
This function can be written as \[ e^x = \sum_{n=0}^{\infty} \frac{1}{n!} x^n = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \ldots \]
In the text the interval of convergence for ln x is (0,2] so what does it mean to do ln(1+x) I can guess that the values change by 1 but I want to plot it to get a visual.
curve(log(x + 1), from = -3, to = 5)
## Warning in log(x + 1): NaNs produced
I can see that the function is only defined when x is −1 I will use c=0
f(x)= ln (x+1); f(0)= ln(1) = 0
derivative of ln u = 1/u f’(x) = 1/ (x+1); f’(0)= 1
f’‘(x) = -1/ (x+1)^2; f’‘(0)= -1 f’’‘(x) = 2/ (x+1)^3; f’’’(0)= 2
We can plug in to get ln(x+1)=0+1⋅x− (1/2)x^2…
(x^n)(-1) ^n-1 /n pattern of +, -
\[ \ln(x + 1) = x - \frac{x^2}{2} + \frac{x^3}{3} - \ldots \]
The textbook doesnt have a reference to this/ its ranges this can also be read as square root of X
curve(sqrt(x), from = -2, to = 8)
## Warning in sqrt(x): NaNs produced
reminder that you cant do squareroot of a negative number so the range would be (0, infinity)
f(x)= x^.5; f(1)= 1
f’(x)= .5 (x^-.5);f’(1)= .5
f’’(x)= -.25 (x^-1.5);
f’‘(1)= -.25 f’’‘(x)= (3/8) x^-2.5; f’’’(1)= 3/8
using c=1
\[ f(x) = f(1) + f'(1)(x - 1) + \frac{f''(1)}{2!}(x - 1)^2 + \frac{f'''(1)}{3!}(x - 1)^3 + \ldots \]
f(x)= 1 + .5(x-1) -.25/2(x-1)^2 + 1/8(x-1)^3…