Let fx cos x If we approximate fa h for a pi3 with a quad
Solution
Consider f(x) = sin(x).
Then for n = 7 we have f(x) = sin(x),
f(0) = 0, f (x) = cos(x), f (0) = +1, f (2)(x) = sin(x),
f(2)(0) = 0, f (3)(x) = cos(x), f(3)(0) = 1, f (4)(x) = sin(x), f(4)(0) = 0, f (5)(x) = cos(x), f(5)(0) = +1, f (6)(x) = sin(x), f(6)(0) = 0, f (7)(x) = cos(x), f(7)(0) = 1.
From this we can see that the pattern 0, +1, 0 , 1, . . .will repeat forever. Substituting these values into the formula we get that for any odd integer n the n-th degree Taylor polynomial for sin(x) is Pn(x) = x x 3 3! + x 5 5! x 7 7! + · · · ± x nn!. Note that P3(x) = xx 3 /6, which is the polynomial we met in section 1. We saw there that this polynomial seemed to fit the graph of the sine function only out to around x = 1. Now, though, we have a way to generate polynomial approximations of higher degrees, and we would expect to get better fits as the degree of the approximating polynomial is increased.
To see how closely these polynomial approximations follow sin(x), here’s the graph of sin(x) together with the Taylor polynomials of degrees n = 1, 3, 5, . . . , 17 plotted over the interval [0, 7.5]: n = 3 n = 5 n = 7 n = 9 n = 11 n = 13 n = 15 n = 1 n = 17 x y 10.2. gher the degree of the polynomial, the better the fit nomials stay close to the sine function for longer and longer intervals—the Taylor polynomial of degree 17 is just beginning to diverge visibly by the time x reaches 2. We might expect that if we kept going, we could find Taylor polynomials that were good fits out to x = 100, or x = 1000. This is indeed the case, although they would be long and cumbersome polynomials to work with. Fortunately, as you will see in the exercises, with a little cleverness we can use a Taylor polynomial of degree 9 to calculate sin(100) to 5 decimal place accuracy. Other Taylor Polynomials: In a similar fashion, we can get Taylor poly- Approximating polynomials for other basic functions nomials for other functions. You should use the general formula to verify the Taylor polynomials for the following basic functions. (The Taylor polynomial for sin(x) is included for convenient reference.)
f(x) Pn(x) sin(x) x x 3 3! + x 5 5! x 7 7! + · · · ± x n n! (n odd) cos(x) 1 x 2 2! + x 4 4! x 6 6! + · · · ± x n n! (n even) e x 1 + x + x 2 2! + x 3 3! + x 4 4! + · · · + x n n! ln (1 x) x + x 2 2 + x 3 3 + x 4 4 + · · · + x n n 1 1 x 1 + x + x 2 + x 3 + · · · + x n
