Taylor Polynomials


Equation
(Eq3)    
 f (x) ≈ Pn(x) =  f (0) + f ' (0)x +
 f '' (0)
2!
x2 + 
 f ''' (0)
3!
x3 + 
 f (4) (0)
4!
x4 + ⋅⋅⋅ + 
 f n (0)
n!
xn
Taylor polynomial of degree n approximating  f (x) for x near 0


Taylor Polynomial Approximations

A function f (x) can be approxiamted near the point x = a by using polynomials. To get more accuracy, higher-degree polynomials are taken. The approximation is usually good near the point x = a, but may wane going farther away from that point.


Linear Approximations

The tangent line approximation which follows:

f (x) ≈ f (a) + f ' (a)(xa)

is the best linear approximation to the function near x = a. The tangent line and curve share the same slope at x = a. If a = 0, this approximation is called a Taylor polynomial of degree 1.

Taylor polynomial of degree 1 approximating  f (x) for x near 0:

(Eq1)    
 f (x) ≈ P1(x) = f (0) + f ' (0)x


Quadratic Approximations

Suppose a more accurate approximation to f (x) = cos x for x near 0 is desired. Instead of using a line, a quadratic function can be used which not only has the same slope, but bends in the same way as the original curve. It is required that at x = 0 the graphs of the original function f and the quadratic function have the same slope, f ' (0), and that they bend at the same rate—in other words, that they have the same second derivative, f '' (0).

Taylor polynomial of degree 2 approximating  f (x) for x near 0:

(Eq2)    
 f (x) ≈ P2(x) = f (0) + f ' (0)x +
 f '' (0)
2
x2


Higher Degree Polynomials

As a rule, over a small interval around x = 0, the quadratic approximation to a function is a better approximation than the linear (tangent line) approximation. Although, even though a function and its quadratic can be matched in terms of their values, their slopes, and their concavity at the point x = 0, the quadratic can still bend away for large values of x. This can be corrected by approximating polynomials of higher degrees. Suppose that it is desired to approximate a function f (x) for x near 0 by a polynomial of degree n:

 f (x) ≈ Pn(x) = C0 + C1x + C2x2 + ⋅⋅⋅ + Cn − 1xn − 1 + Cnxn.

It is still necessary to find the values of the constants: C0, C1, C2,..., Cn. To do this, it is required that the function f (x) and each of its first n derivatives agree with those of the polynomical Pn(x) at the point x = 0. Notice that the higher order derivatives of a function contribute more subtle information about its graph than the first two derivatives do. (For instance, the third derivative measures how fast the concavity changes.) The more derivatives there are that agree at x = 0, the longer the function and the polynomial are likely to remain close to each other.

An example is used to find the constants:

 f (x) ≈ P3(x) = C0 + C1x + C2x2 + C3x3

Substituting x = 0 gives:

 f (0) = P3(0) = C0

Differentiating P3(x) yields:

P'3(x) = C1 + 2C2x + 3C3x2

so substituting x = 0 shows that:

 f' (0) = P'3(0) = C1

Differentiating and substituting again:

P''3(x) = 2(1C2) + 3*2*1C3x

which gives:

 f'' (0) = P''3(0) = 2C2

so that:

 C2 =
 f '' (0)
2

The third derivative, denoted by P3''', is:

P3'''(x) = 3*2*1C3,

so:

 f''' (0) = P3'''(0) = 3*2*1C3

and then:

 C3 =
 f ''' (0)
3*2*1

A similar calculation can be imagined starting with P4(x), using the fourth derivative f (4), which would give:

 C4 =
 f (4) (0)
4*3*2*1

and so on. Using factorial notation, the expressions can be written as:

 C3 =
 f ''' (0)
3!

and:

 C4 =
 f (4) (0)
4!

In general, for any positive integer n,

 Cn =
 f (n) (0)
n!

where f (n) means the nth derivative of  f. So it is defined:

Taylor polynomial of degree n approximating  f (x) for x near 0:

(Eq3)    
 f (x) ≈ Pn(x) =  f (0) + f ' (0)x +
 f '' (0)
2!
x2 + 
 f ''' (0)
3!
x3 + 
 f (4) (0)
4!
x4 + ⋅⋅⋅ + 
 f n (0)
n!
xn

The above equation is for a Taylor polynomial centered at x = 0, or a Taylor polynomial about x = 0.


Taylor Polynomials Around x = a

Suppose it is desired to approximate f (x) = ln x by a Taylor polynomial. This function has no Taylor polynomial about x = 0 because the function is not defined for x = 0 or for x < 0. Can another Taylor polynomial for f (x) = ln x be found?

Rather than constructing a polynomial approximation for f (x) about x = 0, let's contruct a polynomial centered about some other point, x = a. First, lets look at the equation of the tangent line at x = a. Recall that since the tangent line goes through the point (a, f (a)) and has slope f ' (a), its equation is:

y = f (a) + f ' (a)(xa)

This gives the approximation:

f (x) ≈ f (a) + f ' (a)(xa)    for x near a,

which is the tangent line approximation from the very top of this lesson.

The f '(a)(xa) term is a correction term which approximates how much f (x) moves away from f (a) as x moves away from a.

The approximation polynomial Pn(x) centered at x = a will be set up as f (a) plus correction terms which depend on the derivatives of f (x) and which are zero for x = a. This is achieved by writing the polynomial in powers of (xa) instead of powers of x:

 f (x) ≈ Pn(x) = C0 + C1(xa) + C2(xa)2 + ⋅⋅⋅ + Cn − 1(xa)n − 1 + Cn(xa)n.

If derivatives of the approximating polynomial Pn(x) and the original function f (x) are required to agree at x = a, the result follows:

Taylor polynomial of degree n approximating  f (x) for x near a:

 f (x) ≈ Pn(x) =  f (a) + f ' (a)(xa) +
 f '' (a)
2!
(xa)2 + 
 f ''' (a)
3!
(xa)3 + 
 f (4) (a)
4!
(xa)4 + ⋅⋅⋅ + 
 f n (a)
n!
(xa)n

The following conclusions are usually true for Taylor polynomials. Taylor polynomials are a good approximation for x near a. Farther away, they may or may not be good. The higher the degree of the Taylor polynomial, the larger the interval over which it fits the function closely.


Next Lesson: Taylor Series Approximations