Let $f$ be a function of a real variable such that $$f(x) = \frac{1}{e^{2 + \cos(x)} - 1}.$$
Find the (trigonometric) Fourier series of the function $f$ and check if it converges to that function in $R$.
(I have tried a lot of stuff, from trying to calculate residues, to trying to somehow transform it to a real part of something, or even just try to get the result from wolframalpha, but nothing worked.) P.S. I saw that a moderator added a homework tag previously. This is not homework. It is a question from a compilation of advanced problems, and I am just curious as to how this one would be solved.
it really looks like homework. but you say that it is not. however, i am going to respond as i might with homework.
you are using the term Fourier series, right? what do you already know about Fourier series?
$$\begin{align} f(x) &= f(x+P) \qquad \forall x\in\mathbb{R}, -\infty<x<+\infty, \text{ for some }P>0 \\ \\ &= \sum\limits_{n=-\infty}^{+\infty} c_n \, e^{j 2 \pi n x/P} \\ \end{align}$$
where $c_n$ is the $n$-th Fourier coefficent:
$$ c_n = \frac{1}{P} \int\limits_{x_0}^{x_0+P} f(x) \, e^{-j 2 \pi n x/P} \, dx \qquad \forall \ -\infty<x_0<+\infty $$
in summary, first determine that $f(x)$ is periodic and what the period is. then put together the integral for the Fourier coefficients.