Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 am trying to sum the following expression:

(Cos[(2 π m)/N]^2 Cos[(2 π n)/ N])/(2 (Cos[(2 m π)/N] - Cos[(2 n π)/N]))

from m=1 to (N+1)/2 excluding the term m=n. I split this sum into two: the first from m=1 to n-1, and the second from m=n+1 to (N+1)/2.

I run into two problems: the first series just does not evaluate (Mathematica returns the expression). However when I plot it plugging in some values for n, N (with N always greater than m, n), I find the function to be well behaved in the interval.

The second series from n+1 to (N+1)/2 does sum, but it evaluates to complicated QPolygamma functions, and FullSimplify doesn't help. Any help would be appreciated!

share|improve this question
Please let me know if I need to modify the question to make it clearer etc. – Barath Apr 15 '14 at 17:30
Note that N is a special symbol in mathematica – chris Apr 15 '14 at 17:31
@Chris: Good point, but that doesn't seem to be the problem. I changed it to 'M' and the problem still remains. – Barath Apr 15 '14 at 17:34
Not every sum can be represented in a simple closed-form expression. Do you expect that to be the case here? – Sjoerd C. de Vries Apr 15 '14 at 18:56
Using n0 rather then N, if you split up the summand as a series of powers of Cos[(2 \[Pi] m)/n0] - Cos[(2 n \[Pi])/n0], giving (Cos[(2 \[Pi] n)/n0] (Cos[(2 \[Pi] m)/n0] - Cos[(2 n \[Pi])/n0]))/2 + Cos[(2 n \[Pi])/n0]^2 + Cos[(2 n \[Pi])/n0]^3/(2 (Cos[(2 m \[Pi])/n0] - Cos[(2 n \[Pi])/n0])), then Mathematica (version 9) can sum up (excluding m = n) the contribution from each power. – Stephen Luttrell Apr 15 '14 at 18:58

Your Answer


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

Browse other questions tagged or ask your own question.