R Markdown

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.

Problem_1:

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

Solution:

Let f be a function whose first n derivatives exist at x = c. The Taylor polynomial of degree n of f at x = c is

\[\begin{gather*} p_n(x) = f(c) + f'(c)(x-c) + \frac{f''(c)}{2!}(x-c)^2 + \frac{f'''(c)}{3!}(x-c)^3 +\cdot\cdot\cdot + \frac{f^{(n)}(c)}{n!}(x-c)^n\\ = \sum_{n=0}^{\infty}\frac{f^{(n)}(c)}{n!}(x-c)^n \end{gather*}\]

A special case of the Taylor polynomial is the Maclaurin polynomial, where c = 0. That is, the Maclaurin polynomial of degree n of f is:

\[\begin{gather*} p_n(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(0)}{n!}x^n = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 +\cdot\cdot\cdot \end{gather*}\]

Evaluating the function f(0) using \[ f(x) = \frac{1}{(1-x)} \]

we get f(0) = 1

Similarly, \[ f'(x) = \frac{1}{(1-x)^2} \]

and f’(0) = 1

Similarly, \[ f''(x) = \frac{2}{(1-x)^3} \]

and f’’(0) = 2

Finally, \[ f'''(x) = \frac{6}{(1-x)^4} \]

which means f’’’(0) = 6

Plugging in these values into the Maclaurin polynomial equation above, we get: \[\begin{gather*} p_n(x) = 1 + 1x + \frac{2}{2!}x^2 + \frac{6}{3!}x^3 +\cdot\cdot\cdot + \\ \end{gather*}\]

which simplifies to

\[\begin{gather*} = \sum_{n = 0}^{\infty}x^n \end{gather*}\]

Problem_2:

\[ f(x) = e^x \]

Solution:

Let f be a function whose first n derivatives exist at x = c. The Taylor polynomial of degree n of f at x = c is

\[\begin{gather*} p_n(x) = f(c) + f'(c)(x-c) + \frac{f''(c)}{2!}(x-c)^2 + \frac{f'''(c)}{3!}(x-c)^3 +\cdot\cdot\cdot + \frac{f^{(n)}(c)}{n!}(x-c)^n\\ = \sum_{n=0}^{\infty}\frac{f^{(n)}(c)}{n!}(x-c)^n \end{gather*}\]

A special case of the Taylor polynomial is the Maclaurin polynomial, where c = 0. That is, the Maclaurin polynomial of degree n of f is:

\[\begin{gather*} p_n(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(0)}{n!}x^n = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 +\cdot\cdot\cdot \end{gather*}\]

Evaluating the function f(0) using \[ f(x) = e^x \]

we get f(0) = 1

Similarly, f’(0) = 1 f’‘(0) = 1 f’’‘(0) = 1 f’’’‘(0) = 1 and so on because f’(x) = f’‘(x) = f’’‘(x) = f’’’’(x) = e^x

Plugging in these values into the Maclaurin polynomial equation above, we get: \[\begin{gather*} p_n(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdot\cdot\cdot \\ = \sum_{n = 0}^{\infty} \frac{x^n}{n!} \ \end{gather*}\]

Problem_3:

\[ f(x) = \ln(1 + x) \]

Solution:

Let f be a function whose first n derivatives exist at x = c. The Taylor polynomial of degree n of f at x = c is

\[\begin{gather*} p_n(x) = f(c) + f'(c)(x-c) + \frac{f''(c)}{2!}(x-c)^2 + \frac{f'''(c)}{3!}(x-c)^3 +\cdot\cdot\cdot + \frac{f^{(n)}(c)}{n!}(x-c)^n\\ = \sum_{n=0}^{\infty}\frac{f^{(n)}(c)}{n!}(x-c)^n \end{gather*}\]

A special case of the Taylor polynomial is the Maclaurin polynomial, where c = 0. That is, the Maclaurin polynomial of degree n of f is:

\[\begin{gather*} p_n(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(0)}{n!}x^n = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 +\cdot\cdot\cdot \end{gather*}\]

Evaluating the function f(0) using \[ f(x) = \ln(1+x) \]

we get f(0) = 0

Similarly, \[ f'(x) = \frac{1}{(1+x)} \]

we get f’(0) = 1

Similarly, \[ f''(x) = -\frac{1}{(1+x)^2} \]

we get f’’(0) = -1

Finally, \[ f'''(x) = \frac{2}{(1+x)^3} \]

we get f’’’(0) = 2

Finally, \[ f''''(x) = -\frac{6}{(1+x)^4} \]

we get f’’’(0) = -6

Plugging in these values into the Maclaurin polynomial equation above, we get: \[\begin{gather*} p_n(x) = 0 + x - \frac{1}{2!}x^2 + \frac{2}{3!}x^3 - \frac{6}{4!}x^4 + \cdot\cdot\cdot \\ = \sum_{n = 0}^{\infty}(-1)^{n+1}\frac{x^n}{n} \\ \end{gather*}\]