Ana səhifə

Math 175 Worksheet 8: Taylor Polynomials Introduction: Basic Idea


Yüklə 24.36 Kb.
tarix26.06.2016
ölçüsü24.36 Kb.
Math 175 Worksheet 8: Taylor Polynomials
Introduction:
Basic Idea: (Refer to the text, p. 269)
Let be a function defined on some domain containing the point . Sometimes we can represent a more complicated function in terms of a polynomial function. This can be very helpful as polynomial functions can be easily examined. Suppose we want to use a polynomial of a certain fixed degree to approximate the function as well as we can in some neighborhood of the point of interest . For clarity we will assume that we have a polynomial of degree 3. We can write a general polynomial of degree 3 as

where are arbitrary constants. (It is more convenient to express the polynomial in powers of rather than in powers of .)

How do we specify these constants to "best" approximate our function in the vicinity of the point ? What do we mean by 'best'?

We'll answer both questions in the following way.
We would certainly want the polynomial and the function to have the same value at . Setting leads to

.

This determines the first coefficient.

Next, it seems reasonable to require that the polynomial and function have the same slope at . We guarantee that the two functions will have the same slope by setting their derivatives equal to each other.

Since , setting leads to



.
Continuing along in this manner, we next require that the polynomial and function have the same second derivative at . Since , setting leads to

,

or .

By now, the pattern is hopefully apparent. To specify the last coefficient , we equate the third derivatives of and at . Setting leads to

,

or .

Our desired polynomial is therefore
.
This is the Third Degree Taylor Polynomial of centered at . (If we had a polynomial of higher degree, we would continue to equate higher derivatives of the polynomial and function, evaluated at the point of interest.)

We have written the above denominator as (or ) rather than simply to emphasize the general pattern.

Recall factorial notation. .
Using this factorial notation, we can represent the nth degree Taylor Polynomial of centered at as:

Remark: For a particular choice of function , point of interest , and integer , it may be the case that . In that case, the degree Taylor Polynomial of centered at would in fact be a polynomial of degree or less.


Example 1: suppose , and :


This is a polynomial of degree 2. And, in fact, for this example.




Example 2: Consider the function . Suppose we want to compute the 3rd degree Taylor Polynomial of centered at . Then, we must compute

The 3rd degree Taylor Polynomial of at centered at is therefore:

The following graph shows both and on the interval . Note that the natural domain of is while the natural domain of is .


Notice that the graphs are identical for approximately . We say the interval of convergence for is [0, 4].


The problems assigned in this worksheet will ask you to construct and study Taylor Polynomials for a variety of functions and points of interest .

Instructions:

  • Number each problem clearly and circle answers.

  • You should generate all Taylor Polynomials by hand. Then use Matlab to create graphs and make any error calculations.

  • Be sure you write the Taylor Polynomials you generated on your Word document.

  • Do NOT use the Symbolic Toolbox for these problems.

  • Between problems remember to use the commands: zoom off and hold off.

  • You may use “format short” for this worksheet.

  • In some of the following exercises you may find the command "max(y)" helpful. The command returns the maximum value in the array y.

Problem 1.
In this problem, you will compare the effects of using Taylor polynomials of the same degree generated by the same function, but at different values for a. Use
(a) Find , the third degree Taylor polynomial of f centered at .

(b) Find , the third degree Taylor polynomial of f centered at .

(c) Let x = -2: .01: 4;

On a single graph, plot as a solid line, as a dashed line, and as a dotted line.

Use the Matlab command axis ([-2,4,-4,6]) to set the horizontal and vertical axes.

(Recall a dashed line is '-- ' and a dotted line is ' : ')

(d) From your graphs, which of the Taylor polynomials gives the better approximation of at x = 0.1? Explain why.

Which of the Taylor polynomials gives the better approximation of at x = 1.8? Explain why.


Problem 2.
In this problem, you will estimate the accuracy of Taylor Polynomials of different degree generated by a function. Use. Recall that the Matlab command for is exp(u).
(a) Find , the second degree Taylor polynomial of centered at a = 0.
(b) Let x = -1: .01: 1 and plot and together on the same graph.
(c) Use your graph to estimate (to one decimal place) the largest possible interval around a = 0 in which the graph of appears to coincide with the graph of .

That is: Find the interval of convergence of and . You will want to zoom in.


(d) For x = -1: .01: 1 calculate the maximum value for the error .

Use the command: max(abs(f – p2)).



By hand on your graph in part (b), give a visual representation for this maximum error.
(e) Find the third degree Taylor polynomial of centered at a = 0.
(f) Let x = -1: .01: 1 and plot and together on the same graph
(g) Use your graph to find the interval of convergence of and (to one decimal place) around a = 0.
(h) For x = -1: .01: 1 calculate the maximum value for the error .

By hand on your graph in part (f), give a visual representation for this maximum error.
Problem 3.
In this problem, you will determine the order of the Taylor polynomial you need to use in order to achieve a desired accuracy. Use. Recall that the Matlab command for ln(u) is log(u).

In parts (a) and (b), denotes the degree Taylor polynomial, centered at a = 0, of .


(a) Experiment with Taylor polynomials of various degrees until you find the smallest integer n so that the maximum error, , is less than 0.2 for all x in the array x = -0.25: .01: 0.25.

In your Word document include each and the maximum value of the error for x in the array x = -0.25: .01: 0.25 from up to your solution.


(b) On a single graph plot and your for the array x = -0.25: .01: 0.25.





Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©atelim.com 2016
rəhbərliyinə müraciət