__Example1__:

Estimate
the polynomial f(x)=-0.1 x^{4 }-0.15 x^{3 }-0.5 x^{2 }-0.25
x +1.2 at x=1 from its value and derivatives at x=0, using zero, 1^{st},
2^{nd}, 3^{rd} and 4^{th} order Taylor series. Compare
the relative errors in the five approximations.

__Solution__:

WE need to obtain
the first 4 derivatives:

Also, we need to
compute f(0),f’(0),f’’(0), etc.:

Zero order Taylor
series:

1^{st}
order Taylor series:

_{}

2^{nd}
order Taylor series:

3^{nd}
order Taylor series:

4th order Taylor
series:

__Example2__:

Repeat
Example 1 if f(1) is estimated from its value and derivatives at x=0.5.

__Solution__:

Zero order Taylor
series:

1^{st}
order Taylor series:

2^{nd} order
Taylor series:

3^{nd}
order Taylor series:

4th order Taylor
series:

To
see the effect of the size of the interval, let us plot error versus order of
Taylor series for the two intervals of 1 and 0.5:

__ __

__ __

__Example
3:__

Use
Taylor series to estimate f(x)=Cos(x) at x_{i+1}=π/3 with x_{i}= π/4.

a-
Can we get a
0% error using Taylor series?

b-
Employ zero,
1^{st}, 2^{nd}, 3^{rd} order expansions and compute the
relative errors in each case.

__Solution:__

Taylor series can
be generated by Mathematica using the built-in function ‘Series’ according to
the following format:

Series[*function(x)*,
{x,x_{0},n}],

which generates a
power series in x using the values of the function and its n derivatives
evaluated at x_{0}.

* Important: This handout is only a summery of the lecture. The student take detailed notes during the class and refer to the textbook for more examples and discussion