# What summations can Mathematica do? [closed]

I was very pleased to discover that Mathematica could do this summation and produce a symbolic result.

s1 =
1/nn Sum[Cos[2 π a (n - 1)] E^(-I (n - 1) (s - 1)/nn), {n, nn}] // Simplify


The answer is long but very useful for me. I also discovered that Mathematica could do some variants of this sum. However, Mathematica cannot do this summation.

s2 =
1/nn Sum[
Cos[2 π ((a - ϵ) (n - 1) + ϵ/(nn - 1) (n - 1)^2)] E^(-I (n - 1) (s - 1)/nn),
{n, nn}]


This leads to the big question what summations can Mathematica do? Help suggest that "Sum can do essentially all sums that are given in standard books of tables". Is my sum s2 in some way pathological that it cannot be done? My second question is thus can my second sum be coerced into a solution?

These sums come from Fourier analysis, where it is useful to have a symbolic expression for results that are often calculated numerically using the discrete Fourier transform (Fourier in Mathematica). In order to investigate my sum, I looked at the continuous Fourier transform in which time is equal to n -1 and frequency is (s - 1)/nn. The continuous Fourier transform is given by the integral

1/t2 Integrate[Cos[2 π ( (a - ϵ) t + ϵ/t2 t^2)] E^(-I 2 π f t), {t, 0, t2}]


Mathematica can do this integral which comes out in terms of error functions. However, I can't see how to use this to help get the symbolic solution to the sum s2.

In summary what summations can Mathematica do? Is there any hope for getting an closed-form solution for my second sum?

-

## closed as too broad by Michael E2, RunnyKine, m_goldberg, rasher, JensMay 21 '14 at 1:36

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. If this question can be reworded to fit the rules in the help center, please edit the question.

I'm afraid that in its current form this question might be deemed too general and it is at risk of being closed ... It can do some surprising sums such as Sum[1/Prime[k]^2, {k, Infinity}]. No one but the programmers working on Sum would be able to give a complete list of what it can do and what it cannot. It would be better to focus the question on your second sum instead of on what sorts of sums Mma can do in general. –  Szabolcs May 20 '14 at 22:22
+1 for second question. –  Fred Kline May 20 '14 at 23:11
ϵ/(nn - 1) (n - 1)^2 this could have zero divide –  Fred Kline May 20 '14 at 23:49
@Szabolcs well, it can only sort-of do that one--it returns an answer in terms of a special function representing exactly this, and it cannot do Sum[1/Prime[k + 1]^2, {k, Infinity}], for example. (NSum chokes on this one as well, apparently.) Perhaps an apt example of how what it can and can't do might be extremely specific. –  Oleksandr R. May 21 '14 at 0:59
@Szabolcs Thanks for your comment. This is very interesting. I had (probably naively) thought that if Mathematica could do the integration it should be able to do a similar sum. I even thought there were theorems that indicated what could be done. So I have learnt something. What do you suggest: should I start a new question on my specific problem or edit this one to make my specific problem the subject? –  Hugh May 21 '14 at 8:48