FourierCosCoefficient is way more powerful than I expected. For example,
In[1] := Table[FourierCosCoefficient[1/(2 - 2 Cos[x]), x, i], {i, -5, 5, 1}] Out[1] = {-5, -4, -3, -2, -1, 0, -1, -2, -3, -4, -5} In[2] := FourierCosCoefficient[1/(4 - 2 Cos[x] - 2 Cos[y]), {x, y}, {2, 3}] Out[2] = -((8/3 + \[Pi] - Log[2])/\[Pi]) These are indeed the correct results. However, the functions above have singularities, so we can't obtain the results by just integration. How does FourierCosCoefficient find the results? What algorithm does FourierCosCoefficient take for the above examples?