Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to compute the Fourier series of $$f(x)=\frac{1}{2-\cos(x)}$$ on the interval $[0, 2\pi]$. It is an even function, so I need to determine the $a_n$ coefficients. They are given by the following integral:


However, for some reason I can't compute this integral and am thinking I might be doing something wrong. Can anyone help?

share|cite|improve this question
You can use Chebyshev polynomials to write the numerator and denominator as polynomials in $\cos\frac x2$, and then use long polynomial division to separate the fraction into a polynomial in $\cos\frac x2$ (easily integrated) and a remainder term. The remainder will need additional tricks, but at least they will be the same for every $n$. – Henning Makholm Dec 15 '12 at 18:26
That's well beyond the scope of the class I'm taking. Perhaps the question was given in error. Is there no elementary way to do this? Did I set up the integral correctly? – Alex Dec 15 '12 at 18:27
Yes, the integral looks correct (modulo possible errors in the normalization factor, which I don't care enough to look up). What makes you think it is beyond the scope of your course. If "Chebyshev polynomials" looks scary, just think of it as applying the angle-addition formulas from basic trig to $\cos\frac x2$ repeatedly until you reach the desired multiple. – Henning Makholm Dec 15 '12 at 18:35
up vote 6 down vote accepted

Let $\alpha = 2-\sqrt{3}$. For $|z|=1$ we have the following Laurent expansion:

$$ \frac{1}{2-\frac{z+z^{-1}}{2}} =\frac{-2z}{z^2-4z+1} = \frac{\alpha}{\sqrt{3}z(1-\frac{\alpha}{z})} + \frac{1}{\sqrt{3}(1-\alpha z)}=\\ \frac{1}{\sqrt{3}}\left(\dotsc +\frac{\alpha^2}{z^2} +\frac{\alpha}{z}+1 + \alpha z + \alpha^2 z^2 + \dotsc \right) $$

Set $z = e^{ i x}$ to get the required Fourier transform:

$$ \frac{1}{2-\cos(x)} = \frac{1}{\sqrt{3}} + \frac{2}{\sqrt{3}} \sum_{n=1}^\infty (2-\sqrt{3})^n \cos(n x). $$

share|cite|improve this answer
It gives you the requested Fourier expansion and a fortiori the value of all these integrals. – WimC Dec 15 '12 at 19:16
@Alex Look closely at the result. It's exactly the cosine series you want. – Potato Dec 15 '12 at 19:21
If you don't mind, can you explain the logic behind this a little bit? Why did you set alpha to that? What is the first line? The $\frac{1}{2-\dots}$. – Alex Dec 15 '12 at 21:18
@Alex $\alpha$ and $\alpha^{-1}$ are the roots of $z^2-4z+1$. That's why $\alpha$ appears in the partial fractions decomposition. The first expression is based on a fact that can be applied in many cases, namely that $$\cos(x) = \frac{z+z^{-1}}{2}$$ where $z = e^{ix}$. The last equality is not always relevant for computations and simply $|z|=1$ suffices. At a higher level, this is an example that for analytic periodic functions Fourier transform, $z$-transform and Laurent expansions are all just different manifestations of the same underlying structure. – WimC Dec 16 '12 at 7:35

With a general $n$ in the integral formulas, Mathematica didn't finish the integration after more than a minute, which indicates something nontrivial is going on.

However, for particular $n$ values, it finishes very quickly.

f[x_] = 1/(2 - Cos[x]);
L = 2 Pi;
a[n_] := If[n == 0, 2/L*Integrate[f[x], {x, 0, L}], 
   2/L*Integrate[f[x] Cos[n Pi x/L], {x, 0, L}]]
Table[a[n], {n, 0, 10}]

Mathematica graphics

FC[x_, n_] := 1/2*a[0] + Sum[a[i] Cos[i Pi x/L], {i, 1, n}]; 
Plot[Evaluate[{f[x], FC[x, 5]}], {x, 0, L}, 
 PlotStyle -> {{Thick, Black}, {Thick, Blue}}, ImageSize -> 400]

Mathematica graphics

Hope that helps.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.