Construct a two (three) term Taylor series approximation to the function cos(3x) that is valid near x=0.

p_n(x) = f(0) + (x-0)f'(0) + [(x-0)^2]/2 f''(0) and so on. The derivatives are

f'(x) = -3 sin(3x)

f''(x) = -9 cos(3x),

f'''(x) = 27 sin(3x), and

f''''(x) = 81 cos(3x).

so the series is

p_2(x) = 1 + x (- 3 sin(0)) + 1/2 x^2 (- 9 cos(0))

p_2(x) = 1 - 9/2 x^2

Note that the linear term is zeroed out by the sin(0), so you have to use the quadratic Taylor series approximation p_2(x) to get two terms in the resulting approximation.

To get one more term, you have to go up to p_4(x), since the cubic term is also killed off by a sin(0):

p_4(x) = 1 + x (- 3 sin(0)) + 1/2 x^2 (- 9 cos(0)) + 1/6 x^3 (27 sin(0)) + 1/24 x^4 (81 cos(0))

p_4(x) = 1 - 9/2 x^2 + 81/24 x^4