It is instructive to compute the Taylor series for several of the elementary functions. We take up this task in the present section.

The Sine and Cosine Functions

We compute the first few derivatives of f (x) = sin(x):

f'(x) = cos(x)  
f(2)(x) = - sin(x)  
f(3)(x) = - cos(x)  
f(4)(x) = sin(x)  

At this point, we have arrived back at sin(x), and the pattern will repeat itself. Evaluating the derivatives at 0, we find that

f (0) = 0  
f'(0) = 1  
f(2)(0) = 0  
f(3)(0) = - 1  
f(4)(0) = 0  

and so on. This allows us to write down the first few terms of the Taylor series for f (x) = sin(x) at 0:

x - + - + ...    

Below, we plot the graph of sin(x), together with the graphs of its Taylor polynomials p1(x), p3(x), and p5(x).

Figure %: Plot of sin(x), p1(x), p3(x), and p5(x)

We can write the entire Taylor series as