$f(t)=\frac{\cos(\frac{3}{2}t)}{1+\cos^2(\frac{t}{4})}$ Find period and Fourier expansion Given the following function:
$$f(t)=\frac{\cos(\frac{3}{2}t)}{1+\cos^2(\frac{t}{4})}$$
Find period and Fourier expansion.

I think the period is $T=4 \pi$, observing the functions. 
As for the Fourier expansion I have no clue on how to proceed. I know that
$$f(t)= \pi a_0 + \sum_{k=1}^\infty a_k \cos(\frac{kt}{2})$$
$$a_k=\frac{1}{2\pi}\int_{-2\pi}^{2\pi} dt f(t)\cos(kt/2)=\frac{1}{2\pi}\int_{-2\pi}^{2\pi} dt \frac{\cos(\frac{3}{2}t) \cos(kt/2)}{1+\cos^2(\frac{t}{4})}=\frac{1}{\pi}\int_{0}^{2\pi} dt \frac{\cos(\frac{3}{2}t) \cos(kt/2)}{1+\cos^2(\frac{t}{4})}$$
Even with the residue theorem the integral looks really bad since there is that $k \in \mathbb{Z}$... Do I really have to compute this thing?

I will still show the evaluation of the integrals, since it's not always possible to use tricks, sometimes we need the general methods as well. (For what it's worth, in this case the integrals are very simple).
Edited because the period of the function is $4 \pi$ the correct expression should be:
$$a_k=\frac{1}{\pi}\int_{0}^{2\pi}  \frac{\cos(\frac{3}{2}t) \cos \left( \frac{kt}{2} \right)}{1+\cos^2(\frac{t}{4})}dt=\frac{4}{\pi }\int_{0}^{\pi} \frac{\cos(3x) \cos(kx)}{3+\cos x}dx=$$
Now the residue theorem is the most convenient way here, in my opinion, so we transform the integral the following way:
$$=\frac{2}{\pi } \Re \int_{-\pi}^{\pi} \frac{\cos(3x) e^{ikx}}{3+\cos x}dx=\frac{2}{\pi } \Re \int_{-\pi}^{\pi} \frac{\left(e^{3ix}+e^{-3ix} \right) e^{ikx}}{6+e^{ix}+e^{-ix}}dx=$$
Setting $z=e^{ix}$ and choosing the unit circle as the contour, we have:
$$=\frac{2}{\pi } \Re \left( -i \oint \frac{\left(z^3+z^{-3} \right) z^{k-1}}{6+z+z^{-1}}dz \right)=\frac{2}{\pi } \Re \left( -i \oint \frac{\left(z^6+1 \right) z^{k-3}}{6z+z^2+1}dz \right)=$$
We assume $k>2$, the cases $k=0,1,2$ can be dealt with separately (there will be an additional pole at $z=0$ of order $1,2,3$). For other cases, we need to consider only the poles coming from the denominator:
$$z^2+6z+1=0$$
$$z= \pm 2 \sqrt{2}-3$$
Of the roots, only one lies inside the unit circle ($z= 2 \sqrt{2}-3$), so we only need to compute one residue:
$$=\frac{2}{\pi } \Re \left( 2 \pi \frac{\left((2 \sqrt{2}-3)^6+1 \right) (2 \sqrt{2}-3)^{k-3}}{2 \sqrt{2}-3+2 \sqrt{2}+3} \right)=\frac{(2 \sqrt{2}-3)^{k-3}+(2 \sqrt{2}-3)^{k+3}}{\sqrt{2}}    $$
So, finally, for $k>2$, $k \in \mathbb{Z}$ we have:

$$\frac{1}{\pi}\int_{0}^{2\pi}  \frac{\cos(\frac{3}{2}t) \cos \left( \frac{kt}{2} \right)}{1+\cos^2(\frac{t}{4})}dt=\frac{(2 \sqrt{2}-3)^{k-3}+(2 \sqrt{2}-3)^{k+3}}{\sqrt{2}} $$

Note that:
$$2 \sqrt{2}-3=\frac{1-\sqrt{2}}{1+\sqrt{2}}=-\frac{1}{(1+\sqrt{2})^2}$$
