Help working out a Taylor series of cos3x

I've just covered Taylor polynomials and series theory, but there are precious few examples so i'm trying to do the following exercise:

Compute Taylor series of f(x) = cos 3x at pi/12

My attempted answer:

f(x)= cos3x = cos pi/4

f'(x) = -3 sin 3x = -3 sin pi/4

f''(x) = -9 cos 3x = -9 cos pi/4

etc

so Tn cos3x = cos3x + (-3 sin 3x) x/2! + (-9 cos pi/4) x^2/ 3!...

I can't figure how I should go about formulating a series formula for this , especially as trig functions are involved. I'm also not even sure I'm doing the Taylor formula right as i've seen some wierd trig series. Any advice on how to start would be much appreciated

Thanks

Help working out a Taylor series of cos3x

Help working out a Taylor series of cos3x

Ok but I'm still going wrong, sorry please bear with me:

For n=1:

For n=2:

For n=3:

But i can now see that i could get the answer if i take the derivative of what is in brackets to get at least some of what I want eg:

For n=2 it works out:

But for n=3 it doesn't as I still have the x in my result:

But besides, why would i differentiate these terms, if indeed this was the way to go about it? From the Taylor polynomial we only differentiate the function part cos3x as we did already, not the

right?