In Exercises 7 – 12, find a formula for the \(n^{th}\) term of the Taylor series of \(f(x)\), centered at c, by finding the coefficients of the first few powers of x and looking for a pattern. (The formulas for several of these are found in Key Idea 32; show work verifying these formula.)
8:
\[f(x) = \frac{1}{x}; c = 1\]
# Reference: https://www.math.ucla.edu/~anderson/rw1001/library/base/html/curve.html
fct_exp <- function(x){1/x}
curve(fct_exp, from = 0.01, to = 5, type = "l", col = "blue", ylab = "1/x")
Let’s determine the Taylor Polynomial pattern by finding the first few coefficients.
The formula for Taylor Polynomial is:
\[P(x) = \Sigma_{n=0}^{\infty}\frac{f^{(n)}(c)}{n!}(x-c)^n\]
Let us expand out the first few terms so that way we can obtain the first few coefficients.
\[P(x) = f(c) + \frac{f^{(1)}(c)}{1!}(x-c)^1 + \frac{f^{(2)}(c)}{2!}(x-c)^2 + \frac{f^{(3)}(c)}{3!}(x-c)^3 + ...\]
Each \(\frac{f^{(n)}(c)}{n!}\) term is the coefficient in front of each polynomial. Let’s find the first few coefficients.
\(f(c) = \frac{1}{1} = 1\). First coefficient = 1.
\(\frac{f^{(1)}(c)}{1!}(x-c)^1\). First find the first derivative of function f. \(f'(x) = \frac{-1}{x^2}\). Therefore, the coefficient of the first degree polynomial \((x-c)\) is: \(\frac{\frac{-1}{x^2}}{1!} = \frac{-1}{x^2}\). If we plug in for \(c = 1\), the coefficient here is \(f'(1) = \frac{-1}{1!} = -1\).
\(\frac{f^{(2)}(c)}{2!}(x-c)^2\). The second derivative of function f is: \(f''(x) = \frac{2}{x^3}\). The coefficient of the second degree polynomial \((x-c)\) is: \(\frac{\frac{2}{x^3}}{2!} = \frac{1}{x^3}\). Plugging in for \(c = 1\), the coefficient is \(f''(1) = \frac{1}{1^3} = 1\).
\(\frac{f^{(3)}(c)}{3!}(x-c)^3\). The third derivative of function f is: \(f'''(x) = \frac{-6}{x^4}\). The coefficient of the third degree polynomial \((x-c)\) is: \(\frac{\frac{-6}{x^4}}{3!} = \frac{-1}{x^4}\). Plugging in for \(c = 1\), the coefficient is \(f'''(1) = \frac{-1}{1^4} = -1\).
As we can see, the formula for the Taylor Polynomial is starting to look like:
\[P(x) = 1 - (x-c) + (x-c)^2 - (x-c)^3 + ...\] Plugging in \(c = 1\), the formula will appear as:
\[P(x) = 1 - (x-1) + (x-1)^2 - (x-1)^3 + ...\] Which can be generalized for the \(n^{th}\) term as:
\[P^n(x) = \Sigma_{n=0}^{\infty} (-1)^n(x-1)^n\]