Fourier coefficients of |A cos (x)|
Sketching the signal always helps in such cases. Let's consider a cosine of period $T_0$, that is, of fundamental frequency equal to $f_0=1/T_0$. That is the signal on the left.



As you can see on the right, $|A\cos(2\pi f_0 t)|$ does not share the same period with $A\cos(2\pi f_0 t)$. The period of the signal you are looking for is $T_0^{\prime}=T_0/2$ and its fundamental frequency is $f_0^{\prime} = 2f_0 = \frac{2}{T_0}$.

Assuming that you're looking for the exponential Fourier Series, the coefficients should be $$X_k = \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)e^{-j2\pi kf_0^{\prime}t}dt$$
and for $k=0$, which is usually calculated seperately, it is $$X_0 = \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)dt$$

Notice that you can integrate over any time interval of duration equal to $T_0^{\prime}=T_0/2$. I will pick $[-T_0/4, T_0/4]$ since the cosine is always positive in this interval and thus removing the $|\cdot|$ is trivial.

I will help with $X_0$ and you can do the $X_k$s. It is:

$$\begin{align}
X_0 &amp;= \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)dt = \frac{2}{T_0}\int_{-T_0/4}^{T_0/4}A\cos(2\pi f_0t) dt \\
&amp;= \frac{2}{T_0}\frac{A}{2\pi f_0}\sin(2\pi f_0 t)\Big]_{-T_0/4}^{T_0/4} = \frac{2A}{2\pi f_0T_0}\Big(\sin\Big(\pi f_0\frac{T_0}{2}\Big) -\sin\Big(-\pi f_0\frac{T_0}{2}\Big)\Big)
\end{align}$$

We know that $T_0 = 1/f_0 \Longrightarrow f_0T_0=1$ and that $\sin(-x)=-\sin(x)$. Simplifying:

$$\begin{align}
X_0 &amp;= \frac{A}{\pi}\Big(\sin\Big(\frac{\pi}{2}\Big) + \sin\Big(\frac{\pi}{2}\Big)\Big) = \frac{2A}{\pi}
\end{align}$$

Now for the $X_k$s, I've already mentioned that you have to use
$$X_k = \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)e^{-j2\pi kf_0^{\prime}t}dt$$
You can use the same interval for your integration, keep in mind that $f_0T_0=1$ to simplify your expressions, and treat $k$ as a constant until the end. Judging from your question, you should get something that includes $\frac{2A}{(2k+1)\pi}$.