I'm trying to determine the closed-form solution for the Fourier series coefficients of a two-dimensional function. The function that I'm trying to evaluate is V = Cos[x] + Cos[y]. I'm not having problems entering the double integral into Mathematica, but I am having trouble forcing Mathematica to treat the indicies in the expansion as integers. The formula for the Fourier series expansion in two dimensions is:
C(n,m) = Integrate[Integrate[(Cos[x]+Cos[y])*Exp[-I*(n*x+m*y)], dx], dy]
In that integration, variables n and m are integers that allow for calculation of coefficients at discretized indicies. Without Mathematica treating n and m as pure integers it does not return the correct closed form solution.
I tried to force the two variables to be treated as integers by:
but help documents clearly state that the integrate function does not evaluate the IntegersQ function in evaluation of the integral. For example, after executing the above two "IntegersQ" expressions, I could execute Sin[n*Pi] and it will not return zero, since the Sin function does not execute the IntegersQ function.
So ultimately I am stuck trying to find a way to make this integral treat n and m as integers. I know the solution should be some function of KroneckerDelta functions.
Any help anyone can offer is greatly appreciated.