I’d like to find the Fourier coefficients of
$$ x(t) = |A \cos{ ( 2 \pi f_0 t )} | $$
I found that, without taking the absolute value, the coefficient for $k=1$ is $\frac A2$ but now I don’t know how to deal with the signal when the absolute value is taken. Can you help me please? Thank you.
Split the integral. If $2L=1/f_0$, then \begin{align} a_n &=\frac 1L\int_{-L}^L|A \cos ( 2 \pi f_0 t ) |\cos\left(\frac{n\pi}Lt\right)\mathrm dt\\ &=\frac{|A|}L\int_{-L}^L\left|\cos\left(\frac{\pi }Lt\right)\right|\cos\left(\frac{n\pi}Lt\right)\mathrm dt\\ &=\frac{|A|}\pi\int_{-\pi}^\pi|\cos(x)|\cos(nx)\mathrm dx\\ &=\frac{|A|}\pi\int_{-\frac\pi 2}^{\frac{3\pi}2}|\cos(x)|\cos(nx)\mathrm dx\\ &=\frac{|A|}\pi\int_{-\frac\pi 2}^{\frac{\pi}2}|\cos(x)|\cos(nx)\mathrm dx +\frac{|A|}\pi\int_{\frac\pi 2}^{\frac{3\pi}2}|\cos(x)|\cos(nx)\mathrm dx\\ &=\frac{|A|}\pi\int_{-\frac\pi 2}^{\frac{\pi}2}\cos(x)\cos(nx)\mathrm dx -\frac{|A|}\pi\int_{\frac\pi 2}^{\frac{3\pi}2}\cos(x)\cos(nx)\mathrm dx\\ &=-\frac{4|A|}\pi\frac{\cos^3(\pi n/2)}{n^2 - 1} \end{align} On the other hand $b_n=0$.