I have trouble understanding how to find the Fourier transform of $|\cos(2\pi f_0 t)|$. If I have $\cos(2\pi f_0 t)$, I can see it as $\frac{1}{2}\cdot[e^{i2\pi f_0 t}+e^{-i2\pi f_0 t}] $ and its transform is the sum of two Dirac deltas, but what if I have the function written above?
$|\cos(2\pi f_0 t)|$ should be periodic in $ t $ with period $ \frac{1}{2f_0}=\frac{T_0}{2} $ . From the definition, $ x(t)= \sum_{k=-\infty}^{+\infty} X_k \cdot e^{-i2\pi f_0 kt} $ and $ X_k= \frac{1}{T_0} \cdot \int_{-\frac{T_0}{2}}^{+\frac{T_0}{2}}x(t) \cdot e^{-i2\pi f_0 kt} dt $ where $ T_0 $ is the generic period. So $X_k= \frac{2}{T_0} \cdot \int_{-\frac{T_0}{4}}^{+\frac{T_0}{4}} cos(2\pi f_0 t) \cdot e^{-i2\pi f_0 kt} dt $ . If I try to solve this integral, the result I get is $ 0 $ . What am I doing wrong?