I am learning about Fourier series in class and the basic form of a Fourier Series is
$$a_{0}+\sum_{n=1}^{\infty} [a_{n}\cos(nx)+b_{n}\sin(nx)]$$
so a fourier series should have an infinity number of terms.
I was reading the book and it says that the fourier series of $\cos^{2}(3x)$ is $\frac{1}{2}+\frac{1}{2}\cos(6x)$. I am assuming the $\frac{1}{2}$ is the $a_{0}$ term. If this is the fourier series, why does it not have an infiniti number of terms like the form above? Why does it only stop at one term after the $\frac{1}{2}$ term?

