Chapter 10
Polynomial and Series Representations of Functions
10.2 Approximation of Functions: Taylor Polynomials
Polynomials are nice functions. We easily see how to calculate their values, and we know what sorts of graphs these functions should have. Polynomials are easy to integrate and differentiate. Life would be much simpler if every important function were a polynomial. However, there are many important functions that are definitely not polynomials: exponential, sine, cosine, logarithm, inverse tangent, inverse sine, and the error function, to name a few. Although the functions just listed are not polynomials, they can be approximated by polynomials. In this section we study one procedure for finding approximating polynomials.
10.2.1 Coefficients of Polynomials
Let's begin by considering polynomials themselves. Suppose we have a polynomial of degree `4`. Here "have" means that we can obtain the values of the function and any of its derivatives at any particular number in the domain, say, at `0`. How can we obtain a formula for the polynomial? We know that it has a formula of the form
Our problem is to determine the coefficients `c_0, c_1, c_2, c_3` and `c_4`.
It is easy to see that, if we substitute zero for `x`, we find `c_0 = p text[(] 0 text[)]`. To obtain `c_1`, we consider the derivative of `p text[(] x text[)]`. The derivative has the form
Again, it is easy to see that `c_1 = p' text[(] 0 text[)]`. You should notice a pattern beginning to develop — but don't jump to a conclusion too quickly.
Activity 1
Calculate the second derivative of `p text[(] x text[)]`, substitute `x = 0`, and find a formula for `c_2`. Does this formula fit with the pattern you just conjectured? What do you think the pattern is now?
Find a formula for `c_3`.
Find a formula for `c_4`.
Make a conjecture about a general formula that fits all the coefficients.
The general pattern here is that, for each `k`, the coefficient `c_k` satisfies the formula
where `k! = 1 times 2 times 3 times cdots times text[(]k-1text[)] times k`.
The symbol `k!` is read "k factorial." As a matter of convenience, for `k = 0`, we define `0! = 1`. We also define the `0`th derivative of a function to be the function itself. Then the formula given here for `c_k` is correct for `k=0` as well: `c_0 = p text[(] 0 text[)]`.
In general, if
is any polynomial of degree `n`, then, for each `k`, the coefficient `c_k` satisfies
Find a formula for the fourth-degree polynomial function `p text[(] x text[)]` that has the following values for the function and its derivatives at `0`:
`p text[(] 0 text[)] = 3, p' text[(] 0 text[)] = -4, p'' text[(] 0 text[)] = 8, p^((3)) text[(] 0 text[)] = 4,` and `p^((4)) text[(] 0 text[)] = -3`.
Solution Using the formula for coefficients `c_k`, we see that the polynomial has a formula
or, in simplified form,

This is all very good, but we do not anticipate often having to discover a formula for a polynomial by asking a tight-lipped guru questions about the value of the polynomial and its derivatives at zero. The real value of this calculation comes from the following act of faith. We reason that if `f text[(] x text[)]
` is a function that is not a polynomial, and if we calculate the numbers `c_k = f^((k))text[(] 0 text[)]//k!` for `k = 0, 1, 2, ... , ` then the polynomials
`vdots` | |
should approximate `f text[(] x text[)]` near `0`, with each polynomial in the list providing a better approximation than the one before.
In general, this hope turns out to be well-justified, and the reason is not difficult to understand.
- `P_0` is the constant function whose value is `f text[(] 0 text[)]`.
- `P_1` is the linear function that has the same value at zero as `f` and the same first derivative at zero as well — i.e., the graph of `P_1` is the tangent line to the graph of `f` at zero.
- `P_2` is a quadratic polynomial that has the same value, the same first derivative, and the same second derivative as `f` — all at `x = 0` — so its graph should fit the graph of `f` better than the tangent line.
With each addition of a term of higher degree, we get a polynomial with one more derivative that exactly matches the corresponding derivative of `f` at the special point of close fit. Thus, as the degree increases, we expect that the shapes of the polynomial graphs more and more resemble the shape of the graph of `f`.
For `f text[(] x text[)] = e^x`, calculate the first three polynomial approximations `P_0, P_1,` and `P_2`.
Solution For this function, `f' text[(] x text[)] = e^x` and `f'' text[(] x text[)]=e^x` so
Thus
