# Estimate of $\sum_{n=1}^x\exp(\pi i t/n)$ and $\sum_{n=-x}^x\exp(\pi i t/n)$?

https://math.stackexchange.com/questions/2005211/estimate-of-sum-n-1-infty-exp-pi-i-t-n/2005778#2005778

but I did not get a satisfying answer, so I put it here. I would like to estimate (upper and lower bounds for real and imaginary parts) the following sums and series:

$$f_x(t)=\sum_{n=1}^x\exp(\pi i t/n)$$

$$g_x(t)=\sum_{n=-x}^x\exp(\pi i t/n),\qquad n\neq0$$ by some (complex) functions of $t$ or $t,x$, and the same question for their absolute values: $|f_x(t)|,|g_x(t)|$?

Thanks!

P.S. I wrote some code in "Mathematica" as follows:

   f[t_] := Sum[Exp[Pi I t/n], {n, 1, x}];

x = 200;

Plot[{Abs[f[t]], x}, {t, 1, x}]


and I get something like

Of course $x$ is upper bound, but I am looking for asymptotic functions like the "red" ones in the picture that are close to $f_x(t)$.

P.S. I corrected some divergence parts. I added the "red" curve in "paint".

• $f$ and $g$ seem to diverge. – Alex Degtyarev Nov 13 '16 at 13:14
• Not sure why this is getting down-voted. There are ranges of $t$ and $x$ where finding good bounds is a hard question, similar to what one encounters when trying to prove the Lindelöf hypothesis, and similar nontrivial tools apply. – Noam D. Elkies Nov 13 '16 at 15:07
• @Noam: Must be because the downvotes came in before the question was changed. Unless the OP was moving faster than light. – Franz Lemmermeyer Nov 13 '16 at 15:58
• For a good estimate, use the Abel summation formula and $\lfloor x \rfloor = x-\frac12-(\{x\}-\frac12)$ and $f(x) = \int_1^x (\{t\}-\frac12)dt$ which is periodic and integrate by parts : $\sum_{n=1}^k \exp(i a / n) = \lfloor x \rfloor \exp(ia/x)|_1^k+\int_1^k \lfloor x \rfloor \frac{ia}{x^2}\exp(ia/x)dx$ $= \lfloor x \rfloor \exp(ia/x)|_1^k+(x-\frac12)\exp(ia/x)|_1^k -\int_1^k \exp(ia/x)dx-f(x)\exp(ia/x)|_1^k +\int_1^k f(x)(\frac{-ia}{x^2}\exp(ia/x)+\frac{a^2}{x^3}\exp(ia/x))dx$ – reuns Nov 13 '16 at 21:24
• Only one term is problematic : $\int_1^k \exp(ia/x)dx$ – reuns Nov 13 '16 at 21:27