Finding the Fourier series of $\frac{4-2\cos x}{5-4\cos x}$ I am required to find the Fourier Series of the following function, on $[-\pi,\pi]$:
$$f(x)=\frac{4-2\cos(x)}{5-4\cos(x)}$$
This question seemed simple, at first. I managed to compute $a_0$ (which wasn't too easy) and noticed that $b_n=0$ for all $n\in\mathbb{N}$ (since the given $f$ is even). However, computing the coefficients $a_n$ seemed like an impossible mission. So I cheated a little, and looked at the final answer, which is:
$$f(x)\simeq1+\sum_{n=1}^{\infty}\frac{1}{2^n}\cos(nx)\triangleq\mathfrak{F}(x)$$
The problem is $a_n$ - I don't know how to compute them, and therefore I couldn't find the Fourier Series by myself. However, after finding out what the final answer is, I thought of a creative way to show the final answer is actually the Fourier Series of $f(x)$. This is kind of cheating, but I'll show my solution anyway:
Let $z=\frac{\cos(x)+i\sin(x)}{2}, z\in\mathbb{C}.$ Using the fact that $z^n=\frac{\cos(nx)+i\sin(nx)}{2^n}$, and that $|z|=\frac 12<1$, we receive:
$$\mathfrak{F}(x)=\sum_{n=0}^{\infty}\Re{(z^n)}=\Re{\left(\sum_{n=0}^{\infty}z^n\right)}=\Re{\left(\frac{1}{1-z}\right)}$$$$=\Re{\left(\frac{1-\bar{z}}{|1-z|^2}\right)}=\Re{\left(\frac{1-0.5\cos(x)+0.5i\sin(x)}{(1-0.5\cos(x))^2+(0.5\sin(x))^2}\right)}$$$$=\frac{1-0.5\cos(x)}{1-\cos(x)+0.25\cos^2(x)+0.25\sin^2(x)}=\frac{4-2\cos(x)}{5-4\cos(x)}\equiv f(x)$$
We know that $f(x)$ is differentiable everywhere. Therefore, it has only one Fourier Series, and it has to be $\mathfrak{F}(x)$, since it is a Fourier Series that converges to $f(x)$. This might not be a true statement (so please correct me if so), but either way, I would like to hear your thoughts about a more legit solution to the problem (without knowing the Fourier Series in advance).

Here is a noncomplex way to do the integral. Multiply top and bottom by $5+4\cos x$:
$$\frac{20+6\cos x +8\cos^2x}{25-16\cos^2 x} = -\frac{1}{2} +\frac{6\cos x}{9+16\sin^2 x} +\frac{65}{2}\frac{1}{9+16\sin^2 x}$$
$$I = \int_{-\pi}^\pi -\frac{1}{2} + \frac{6\cos x}{9+16\sin^2 x} +\frac{65}{2}\frac{1}{9+16\sin^2 x} \:dx = \pi +\frac{1}{2}\arctan\left(\frac{4}{3}\sin x \right)\Biggr|_{-\pi}^\pi + \frac{65}{2}\int_{-\pi}^\pi \frac{\sec^2 x}{9 + 25\tan^2 x} \:dx$$
$$ = \pi + 0 + \frac{13}{6}\arctan\left(\frac{5}{3}\tan x \right)\Biggr|_{-\pi}^\pi $$
That last limit is not simple to evaluate because of the singularities, but just take the limits separately to each one. Each interval of $\pi$ picks up a value of $\pi$ so we have
$$\pi +\frac{13\pi}{3} = \frac{16\pi}{3}$$
