ASSIGNMENT 14 - TAYLOR SERIES

IS 605 FUNDAMENTALS OF COMPUTATIONAL MATHEMATICS - 2014

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.

* \(f(x)=\frac{1}{(1−x)}\)

Derivatives and evaluation at \(x=0\) leads to below

\(f(x)=\frac{1}{(1−x)}→f(0)=1\)

\(f′(x)=\frac{1}{(1−x)^2}→f′(0)=1\)

\(f′′(x)=\frac{2}{(1−x)^3}→f′′(0)=2\)

\(f′′′(x)=\frac{6}{(1−x)^4}→f′′′(0)=6\)

\(f^4(x)=\frac{24}{(1−x)^5}→f^4(0)=24\)

\(f^5(x)=\frac{120}{(1−x)^6}→f^5(0)=120\)

As per McClaurin Series formula

\(1+\frac{1}{1!}x^1+\frac{2}{2!}x^2+\frac{6}{3!}x^3+\frac{24}{4!}x^4+\frac{120}{5!}x^5+...\)

Leads to

\(1+x+x^2+x^3+x^4+x^5+...+x^n\)

In summation form we can rewrite as below,

\(∑_{n=0}^∞x^n\)


 

* \(f(x) = e^x\)

Derivatives and evaluation 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\)

\(f^4(x)=e^x → f^4(0)=1\)

\(f^5(x)=e^x → f^5(0)=1\)

Using McClaurin Series formula:

\(1 + \frac{1}{1!}x^1 + \frac{1}{2!}x^2 + \frac{1}{3!}x^3 + \frac{1}{4!}x^4 + …\)

We get,

\(1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+...+\frac{x^n}{n!}\)

In summation form we can write as below:

\(∑_{n=0}^∞\frac{x^n}{n!}\)


 

* \(f(x) = ln(1 + x)\)

Derivatives and evaluation at \(x=0\).

\(f(x)=ln(1+x)→f(0)=0\)

\(f′(x)=\frac{1}{x+1}→f′(0)=1\)

\(f′′(x)=\frac{−1}{(x+1)^2}→f′′(0)=−1\)

\(f′′′(x)=\frac{2}{(x+1)^3}→f′′′(0)=2\)

\(f^4(x)=\frac{−6}{(x+1)^4}→f^4(0)=−6\)

\(f^5(x)=\frac{24}{(x+1)^5}→f^5(0)=−24\)

McClaurin Series

\(0+\frac{1}{1!}x^1−\frac{1}{2!}x^2+\frac{2}{3!}x^3−\frac{6}{4!}x^4+\frac{24}{5!}x^5+...\)

we get,

\(x−\frac{1}{2}x^2+\frac{1}{3}x^3−\frac{1}{4}x^4+\frac{1}{5}x^5+...(−1)^{n+1}\frac{x^n}{n}\)

In summation form:

\(∑^∞_{n=1}(−1)^{n+1}\frac{x^n}{n}\)