How do you find the maclaurin series expansion of ##f(x)=cos3x##?

Refer to explanation

A Maclaurin series is a Taylor series expansion of a function about 0, hence

##f(x)=f(0)+f'(0)x+(f”(0))/(2!)*x^2+(f”'(0))/(3!)+…+(f^(n)(0))/(n!)*x^n##

where ##f^(n)(0)## is the n-th order derivative of ##f(x)##.

Hence we have to calculate some derivatives around zero so

##f(x)=cos3x=>f(0)=1## ##f'(x)=-3sin3x=>f'(0)=0## ##f”(x)=-3^2*cos3x=>f”(0)=-3^2## ##f”'(x)=3^3*sin3x=>f”'(0)=0## ##f””(4)=3^4*cos3x=>f””(0)=3^4##

So the maclaurin series can be written as

##cos3x=Σ_0^oo (-1)^n*(3)^(2n)*(x^(2n))/((2n)!)##