I'm working with spectral approximations and I ran into this problem. Hope someone knows how to solve it!
$(D_N)_{lj} = \frac{1}{N} \sum_{k=-N/2}^{N/2-1} i k e^{2 i k (l-j) \pi /N} $ ..............(I have this)
This sum may be evaluated in closed form:
$(D_N)_{lj} = \frac{1}{2}(-1)^{l+j} cot[\frac{(l-j)\pi }{N}]$ for l $\neq$ j ..........(How can I make it look like this)
$(D_N)_{lj} = 0 $ for l = j
I appreciate you taking the time to read (and hopefully answer) my question.
Generally you can find the closed form for $f(x)=\sum_{k=a}^{k=b}k x^k$ by taking the sum of the geometric series $g(x)=\sum_{k=a}^{k=b}x^k$ and observe that $f(x)=x g'(x).$