# Trigonometric sums related to the Verlinde formula

Original question (see also the revised, possibly simpler, version below): Let $g > 1, r > 1$ be integers. Playing around with the Verlinde formula (see below), I came across the expression $$\sum_{n=1}^{r-1} \sin(\pi n/r)^{2-2g} (e^{2\pi i n^2/r}-1).$$

My goal is to reduce the complexity in $r$ of this expression; that is, to find a closed form of the sum avoiding the dependence on $r$ in the number of summands. Is this possible? Here's a related example:

The Verlinde formula, which e.g. has applications in conformal field theory, algebraic geometry, and quantum topology, is $$(r/2)^{g-1}\sum_{n=1}^{r-1} \sin(\pi n/r)^{2-2g}.$$ In this case, one can use a trick by Szenes to reduce the complexity of the sum: The sum can be written as $$\sum_{n=1}^{r-1} f(z_n).$$ where $z_n = e^{\pi i n/r}$, for a suitable meromorphic function $f : \mathbb{C} \to \mathbb{C}$ having poles only at $1$ and $-1$. Now the trick essentially is to find a suitable meromorphic form $\mu_r$ having poles at $2r$'th roots of unity and apply the Residue Theorem to $f\mu_k$ to rewrite the above sum as $$\sum_{n=1}^{r-1} f(z_n) = -\text{Res}_{z=1} f\mu_r,$$ which then turns out to be a polynomial in $r$ of degree $2g-2$.

This trick doesn't seem to apply to my slightly more complicated sum though. Another possibility might be to somehow rewrite the sum as a Gauss sum, but that doesn't quite seem to work either.

"Revised" question: So, maybe the question above does not have a straightforward answer, but I believe it might suffice to be able to work out the following (at least, it's a similar problem). Say we just have a sum like $$\sum_{n=1}^{r-1} e^{\pi i n^2/(2r)}$$ as above (almost, anyway). Then we may apply a quadratic reciprocity theorem to simplify matters. But say now that we throw in a power of $n$ to get something like $$\sum_{n=1}^{r-1} n^k e^{\pi i n^2/(2r)},$$ for $k > 0$. Can sums like these be treated in a similar manner as the quadratic Gauss sum above (perhaps just in special cases like $k = 1$, or $k = 2$); can we somehow describe the large $r$ asymptotics? Standard tricks in this field seem to involve summation by parts and the Euler--Maclaurin formula but it doesn't seem to quite work out. For example, in the case $k = 1$, summation by parts (or elementary combinatorial considerations) will imply $$\sum_{n=1}^{r-1} n e^{\pi i n^2/(2r)} = (r-1)\sum_{n=1}^{r-1} e^{\pi in^2/(2r)} - \sum_{j=1}^{r-1}\sum_{n=1}^j e^{\pi in^2/(2r)}.$$ Now, the first term is simple to handle as mentioned above, but the second one seems to be worse. Any suggestions?

-
You say "formula" but I only see an expression. – Qiaochu Yuan Aug 18 '11 at 18:31
@Qiaochu Yuan: I guess I decided to omit the "left hand side", since it's somewhat unrelated to the question at hand and no matter which of the many interpretations of it I had included, an unnecessary amount of cluttering formalism would have gone into motivating it. That being said, let me know if I should elaborate and/or introduce further motivation, and I'd be happy to do so. – fuglede Aug 18 '11 at 21:16
The first thing I think of when I see a sum like that is $$\sum_{n} n^{2k} e^{2\pi i a n^2/r} = \left(\frac{r}{2\pi i} \frac{d}{da}\right)^k \ \sum_{n} e^{2\pi i a n^2/r}$$ – user26872 Mar 17 '12 at 20:33
Do you have any example or argument saying that there should be a nicer formula for the sum? – AD. May 17 '12 at 10:51
To reduce the complexity of the sum try the book Mitrinovic, Keckic, The Cauchy method of residues, theory and applications (1984), however it is 10 years earlier then Szenes' paper. – vesszabo Jul 4 '12 at 10:40

Proposition 1 answers the "revised" question and Proposition 2 the original one. For completeness we give a self-contained proof of Proposition 2.

Proposition 1

Let $n\in\mathbb{N}$ and let $p(x)=\alpha x^2+\beta x +\gamma$ be a polynomial with real coefficients where $\alpha >0$ such that $p'(n)> 0$ and $p'(n+1)<1$. Then for $k\in \mathbb{Z}\,$ if $n>0$ and for $k\in \mathbb{N}\,$ if $n=0$ we have $$\frac{1}{2}(n^k e^{2\pi i p(n)}+(n+1)^k e^{2\pi i p(n+1)})=$$ $$e^{2\pi i p(n+1)}\phi_k (n+1,p''(n+\frac{1}{2}),p'(n+1))-e^{2\pi i p(n)}\phi_k (n,p''(n+\frac{1}{2}),p'(n))$$ where $\phi_k$ is the function defined on $A\times ]0,\infty[\times]0,1[$ with $A=\mathbb{N}$ or $\mathbb{N}^*$ according to $k\geq 0$ or $k<0$ by $$\phi_k(m,\lambda,\mu)=\frac{i}{2} \int_0^{\infty}\left((m-ix)^k e^{2\pi( \mu-\frac{1}{2})x}-(m+ix)^k e^{-2\pi( \mu-\frac{1}{2})x}\right)\text{csch}(\pi x) e^{-i\pi \lambda x^2}\,dx\,.$$ The main ingredient in the proof of Proposition 1 is Lemma 1 which is proved in my paper "Sommes exponentielles, splines quadratiques et fonction zêta de Riemann" published in the "Comptes-rendus de l'Académie des sciences" in 2001 and avalaible at this address

http://math.heig-vd.ch/fr-ch/Recherche/Recherches/Philippe_Blanc_novembre_2000.pdf

A detailed version is avalaible at this address

http://math.heig-vd.ch/fr-ch/Recherche/Recherches/Philippe_Blanc_mars_2001.pdf

Lemma 1

Let $n$ be an integer, $p(x)=\alpha x^2+\beta x +\gamma$ be a polynomial with real coefficients where $\alpha >0$ and let $z(\cdot)$ be the unique function satisfying $p'(z(y))=y$ for all $y \in \mathbb{R}$. Then $$\frac{1}{2}(e^{2\pi i p(n)}+e^{2\pi i p(n+1)})=\frac{e^{i\frac{\pi}{4}}}{\sqrt{p''(n+\frac{1}{2})}}\sum_{\lfloor p'(n)\rfloor +1}^{\lfloor p'(n+1)\rfloor }e^{2\pi i(p(z(k))-kz(k))}+$$ $$e^{2\pi i p(n+1)}\phi (p''(n+\frac{1}{2}),\{p'(n+1)\})-e^{2\pi i p(n)}\phi (p''(n+\frac{1}{2}),\{p'(n)\})$$ where $\lfloor \cdot \rfloor$ and $\{\cdot\}$ denote respectively the floor and fractional part functions and $\phi$ is the function defined on $]0,\infty[\times[0,1]$ by $$\phi(\lambda,\mu)=i \int_0^{\infty}\sinh (2\pi( \mu-\frac{1}{2})x)\text{csch}(\pi x) e^{-i\pi \lambda x^2}\,dx\,.\hspace{3mm}\Box$$ Proof of Proposition 1

With the assumptions on the derivatives of $p$ the sum which appears in Lemma 1 is void and we have $$\frac{1}{2}(e^{2\pi i p(n)}+e^{2\pi i p(n+1)})=$$ $$e^{2\pi i p(n+1)}\phi(p''(n+\frac{1}{2}),p'(n+1))-e^{2\pi i p(n)}\phi(p''(n+\frac{1}{2}),p'(n)) \tag{1}$$ which proves the case $k=0$.

Considering the terms of (1) as a function of $\beta$ and differentiating $k$ times with respect to $\beta$ we get the proposition for $k>0$.

Then we replace the polynomial $p$ by $p_z(x)=p(x)+zx$ where $z\in \mathbb{C}$. The left hand side of (1), considered as a function of $z$, is holomorphic. The right hand side of (1) is also holomorphic in the band $B=\{z\in \mathbb{C}\vert -p'(n)< \Re z<1-p'(n+1) \}$. Since identity (1) holds for real $z\in B$, it holds in $B$. We set $p_{it_1}(x)=p(x)+it_1 x$ in identity (1), integrate a first time with respect to $t_1$ on the interval $[t_2,\infty[$, a second time with respect to $t_2$ on the interval $[t_3,\infty[$,..., and finally integrate a k-th time with respect to $t_k$ on the interval $[0,\infty[$ to complete the proof in the case $k<0\,.\hspace{3mm}\Box$

The functions $\phi_k$ extend by continuity on $A\times ]0,\infty[ \times [0,1]$. Choosing, for example, $k=1$, $p(x)=\frac{x^2}{4r}$ in the identity of Proposition 1 and summing these identities from $n=0$ to $r-1$ we get $$\sum_{n=1}^{r-1} n e^{\pi i \frac{n^2}{2r}}=-\frac{1}{2}re^{\pi i \frac{r}{2}}+e^{\pi i \frac{r}{2}}\phi_1(r,\frac{1}{2r},\frac{1}{2})-\phi_1(0,\frac{1}{2r},0)=$$ $$=\left ( -\frac{1}{2}e^{\pi i \frac{r}{2}}+\frac{i}{\pi}\right )r-\int_0^{\infty}\frac{xe^{-\pi x}}{\sinh \pi x}e^{-i \pi \frac{1}{2r}x^2 }\,dx+ \left ( \int_0^{\infty}\frac{x}{\sinh \pi x}e^{-i\pi \frac{1}{2r} x^2}\,dx\right )e^{\pi i \frac{r}{2}}$$ which implies that $$\sum_{n=1}^{r-1} n e^{\pi i \frac{n^2}{2r}}=\left (-\frac{1}{2}e^{\pi i \frac{r}{2}}+\frac{i}{\pi}\right )r-\frac{1}{12}+\frac{1}{4}e^{\pi i \frac{r}{2}}+O(\frac{1}{r})\,.$$ Now for $x\in]0,\pi[$ and an integer $g>1$ we have $$(\sin x)^{2-2g}=\sum_{k=1-g}^{\infty}\alpha_{2k}x^{2k}$$ and Proposition 1 suggests the following result.

Proposition 2

Let $r,\,g$ and $n$ be integers such that $r>1$, $g>1$ and $1\leq n \leq \frac{r}{2}-1$. Then $$\frac{1}{2}\left ( (\sin \pi \frac{n}{r})^{2-2g} e^{2\pi i \frac{n^2}{r}}+(\sin \pi \frac{n+1}{r})^{2-2g} e^{2\pi i \frac{(n+1)^2}{r}}\right )= e^{2\pi i \frac{(n+1)^2}{r}}\Psi_{r,g}(n+1)-e^{2\pi i \frac{n^2}{r}}\Psi_{r,g}(n)$$ where $\Psi_{r,g}$ is the function defined on $\{1,2,\ldots,\lfloor \frac{r}{2}\rfloor\}$ by $$\Psi_{r,g}(m)=$$ $$\frac{i}{2} \int_0^{\infty}\left ((\sin\pi \frac{m-ix}{r})^{2-2g} e^{2\pi( \frac{2m}{r}-\frac{1}{2})x}-(\sin\pi \frac{m+ix}{r})^{2-2g} e^{-2\pi( \frac{2m}{r}-\frac{1}{2})x}\right ) \,\text{csch}(\pi x) e^{-i \pi \frac{2}{r} x^2} \, dx$$

Proof of Proposition 2

Introducing the function $f(x)=(\sin x)^{2-2g}$ we have $$\int_0^{\infty}\left ( f(\pi \frac{m-ix}{r}) e^{2\pi( \frac{2m}{r}-\frac{1}{2})x}-f(\pi \frac{m+ix}{r}) e^{-2\pi( \frac{2m}{r}-\frac{1}{2})x}\right ) \,\text{csch}(\pi x) e^{-i \pi \frac{2}{r} x^2} \, dx =$$ $$\text {PV}\int_{-\infty}^{\infty}f(\pi \frac{m-ix}{r}) e^{2\pi( \frac{2m}{r}-\frac{1}{2})x} \,\text{csch}(\pi x) e^{-i \pi \frac{2}{r} x^2} \, dx \tag{2}$$ for $m\in \{1,2,\ldots,\lfloor \frac{r}{2}\rfloor\}$. Now we compute $$\text {PV}\int\limits_{C_R}f(\pi \frac{n-iz}{r}) e^{2\pi( \frac{2n}{r}-\frac{1}{2})z} \,\text{csch}(\pi z) e^{-i \pi \frac{2}{r} z^2}\,dz$$ where $C_R$ is the boundary of the rectangle with vertices $-R$, $R$, $R+i$ and $-R+i$ and taking the limit as $R \to \infty$ and using the residue theorem we get $$\text {PV}\int_{-\infty}^{\infty}f(\pi \frac{n-ix}{r}) e^{2\pi( \frac{2n}{r}-\frac{1}{2})x} \,\text{csch}(\pi x) e^{-i \pi \frac{2}{r} x^2} \, dx +$$ $$\text {PV}\int_{\infty}^{-\infty}f(\pi \frac{n-i(i+x)}{r}) e^{2\pi( \frac{2n}{r}-\frac{1}{2})(i+x)} \,\text{csch}(\pi (i+x)) e^{-i \pi \frac{2}{r} (i+x)^2} \, dx =$$ $$\pi i \left( \frac{f(\pi \frac{n}{r})}{\pi}+e^{2\pi i \frac{2n+1}{r}}\frac{f(\pi \frac{n+1}{r})}{\pi}\right )\,.$$ Finally we multiply this identity by $-\frac{i}{2}e^{2\pi i \frac{n^2}{r}}$ and we complete the proof observing that $$\text {PV}\int_{\infty}^{-\infty}f(\pi \frac{n-i(i+x)}{r}) e^{2\pi( \frac{2n}{r}-\frac{1}{2})(i+x)} \,\text{csch}(\pi (i+x)) e^{-i \pi \frac{2}{r} (i+x)^2} \, dx =$$ $$-e^{2\pi i \frac{2n+1}{r}}\text {PV}\int_{-\infty}^{\infty}f(\pi \frac{n+1-ix)}{r}) e^{2\pi( \frac{2(n+1)}{r}-\frac{1}{2})x} \,\text{csch}(\pi x) e^{-i \pi \frac{2}{r} x^2} \, dx$$ and using relation (2).$\hspace{3mm}\Box$

Coming back to the original question in the case $g=2$, assuming $r$ odd for simplicity and summing the identities of Proposition 2 from $n=1$ to $\frac{r-3} {2}$ we have $$\sum_{n=1}^{r-1} \left (\sin \pi \frac{n}{r}\right )^{-2} \left (e^{2\pi i \frac{n^2}{r}}-1\right )=2\sum_{n=1}^{\frac{r-1}{2}} \left ( \sin \pi \frac{n}{r}\right )^{-2} \left (e^{2\pi i \frac{n^2}{r}}-1\right )=$$ $$2\left ( \frac{1}{2}\left (\sin \pi \frac{1}{r}\right )^{-2} e^{2\pi i \frac{1}{r}}+\frac{1}{2}\left ( \sin \pi \frac{r-1}{2r}\right )^{-2} e^{2\pi i \frac{(r-1)^2}{4r}}\right ) +$$ $$2\left ( e^{2\pi i \frac{(r-1)^2}{4r}}\Psi_{r,2}(\frac{r-1}{2})-e^{2\pi i \frac{1}{r}}\Psi_{r,2}(1)-\sum_{n=1}^{\frac{r-1}{2}} \left ( \sin \pi \frac{n}{r}\right ) ^{-2}\right).$$

Proposition 3

$$\Psi_{r,2}(1)=\frac{1}{\pi^2}\left ( \frac{1}{2}-\frac{\pi^2}{6}\right ) r^2+\frac{1}{\pi}(1-i)r^{\frac{3}{2}}+O(r)\,.$$

Proof of Proposition 3

By introducing the real-valued functions $g_{re}$ and $g_{im}$ defined by the relation $$\left ( \sin \pi \frac{1 + ix}{r}\right )^{-2}=\frac{r^2}{\pi ^2}\frac{1}{(1+ i x)^2} +g_{re}(x)+ i g_{im}(x)$$ and setting $\displaystyle \mu=\frac{2}{r}$ for ease of notations we have $$\Psi_{r,2}(1)=\frac{r^2}{\pi ^2}\Theta +\Phi$$ where $$\Theta =\frac{i}{2} \int_0^{\infty}\left (\frac{1}{(1-ix)^2} e^{2\pi( \mu-\frac{1}{2})x}-\frac{1}{(1+ix)^2} e^{-2\pi( \mu-\frac{1}{2})x}\right )\,\text{csch}(\pi x) e^{-i\pi \mu x^2}\,dx \,=A+B$$ with $$A=i \int_0^{\infty}\frac{1-x^2}{(1+x^2)^2} \sinh(2\pi( \mu-\frac{1}{2})x)\,\text{csch}(\pi x) e^{-i\pi \mu x^2}\,dx \,,$$ $$B=-\int_0^{\infty}\frac{2x}{(1+x^2)^2} \cosh(2\pi( \mu-\frac{1}{2})x)\,\text{csch}(\pi x) e^{-i\pi \mu x^2}\,dx$$ and $$\Phi=i \int_0^{\infty}\left ( g_{re}(x)\sinh ( 2\pi( \mu-\frac{1}{2})x)-i g_{im}(x)\cosh (2\pi( \mu-\frac{1}{2})x)\right )\,\text{csch}(\pi x) e^{-i\pi \mu x^2}\,dx\,.$$ As $\displaystyle \int_0^t e^{-i\pi \mu x^2}\,dx=O(\mu^{-\frac{1}{2}})$ we can use the second mean value theorem to check that $\displaystyle \Phi=O(\mu^{-\frac{1}{2}})$. Further we use the identity $$\sinh(2\pi (\mu-\frac{1}{2})x)\text{csch} \pi x = -e^{-2\pi \mu x}+e^{-\pi x}\sinh(2\pi \mu x)\text{csch} \pi x$$ to write $A=A_1 + A_2$ and we bound the modulus of $A_2$ by the integral of the modulus to get $A_2=O(\mu )$. Using an integration by parts we have $$A_1 = -i\int_0^{\infty}\frac{1-x^2}{(1+x^2)^2}e^{-2\pi \mu x} e^{-i\pi \mu x^2}\,dx=$$ $$=-2\pi \mu i \int_0^{\infty}\frac{x}{1+x^2}e^{-2\pi \mu x}e^{-i\pi \mu x^2}\,dx+2\pi \mu \int_0^{\infty}\frac{x^2}{1+x^2}e^{-2\pi \mu x}e^{-i\pi \mu x^2}\,dx=$$

$$2\pi \mu \int_0^{\infty}e^{-2\pi \mu x}e^{-i\pi \mu x^2}\,dx-2\pi \mu i \int_0^{\infty}\frac{x}{1+x^2}e^{-2\pi \mu x}e^{-i\pi \mu x^2}\,dx-$$ $$2\pi \mu \int_0^{\infty} \frac{1}{1+x^2} e^{-2\pi \mu x}e^{-i\pi \mu x^2}\,dx\,.$$ We make use of relations (8.256.3) and (8.256.4) of Gradshteyn and Ryzhik to conclude that $$A_1=\pi e^{-i\frac{\pi}{4}} \mu^{\frac{1}{2}}-2\pi \mu i \int_0^{\infty}\frac{x}{1+x^2}e^{-2\pi \mu x}e^{-i\pi \mu x^2}\,dx+O(\mu)\,.$$ Similarly we use the identity $$\cosh(2\pi (\mu-\frac{1}{2})x)\text{csch} \pi x\ =\coth(\pi x)+2\sinh(\pi (\mu-1) x)\sinh(\pi \mu x)\text{csch} \pi x$$ to write $B=B_1+B_2$ where $B_2=O(\mu)$. We have, using the identity $\displaystyle \coth \pi x =1 +\frac{2}{e^{2\pi x}-1}$, relation (3.415.2) of Gradshteyn and Ryzhik and an integration by parts $$B_1=-\int_0^{\infty}\frac{2x}{(1+x^2)^2}\coth (\pi x) e^{-i\pi \mu x^2}\,dx=$$ $$-\int_0^{\infty}\frac{2x}{(1+x^2)^2}\coth (\pi x)\,dx -\int_0^{\infty}\frac{2x}{(1+x^2)^2}(e^{-i\pi \mu x^2}-1)\,dx +O(\mu)=$$ $$\frac{1}{2}-\frac{\pi^2}{6}+2\pi \mu i \int_0^{\infty}\frac{x}{1+x^2}e^{-i\pi \mu x^2}\,dx+O(\mu)\,.$$ Finally $$\Theta=A_1+B_1+O(\mu)=\frac{1}{2}-\frac{\pi^2}{6}+\pi e^{-i\frac{\pi}{4}} \mu^{\frac{1}{2}}+2\pi \mu i \int_0^{\infty}\frac{x}{1+x^2}(1-e^{-2\pi \mu x})e^{-i\pi \mu x^2}\,dx+O(\mu)$$ and using the second mean value theorem we get $$\Psi_{r,2}(1)=\frac{r^2}{\pi ^2}\left ( \frac{1}{2}-\frac{\pi^2}{6}+\pi (1-i) r^{-\frac{1}{2}}+O(\frac{1}{r})\right )=$$ $$\frac{1}{\pi^2}\left ( \frac{1}{2}-\frac{\pi^2}{6}\right ) r^2+\frac{1}{\pi}(1-i)r^{\frac{3}{2}}+O(r)\,.\hspace{3mm}\Box$$

Proposition 3 together with the fact that $\displaystyle \Psi_{r,2}(\frac{r-1}{2})=O(r)$ imply $$\sum_{n=1}^{r-1} \left ( \sin \pi \frac{n}{r}\right ) ^{-2} \left ( e^{2\pi i \frac{n^2}{r}}-1\right ) =\frac{2}{\pi}(-1+i)r^{\frac{3}{2}}+O(r)\,.$$ Note that it is easy to prove that the previous sum is a $\displaystyle O(r^{\frac{3}{2}})$ by using the bound $\displaystyle \vert e^{it}-1 \vert \leq \min (t,2)$.

-
This looks really good; thanks a lot for the big effort! I'll work through it and get back. – fuglede Apr 26 '13 at 16:54
It seems indeed like this is really helpful. Can I perhaps convince you to elaborate on the last two identities of your answer? They do not seem very obvious to me. At least I don't see what is used to obtain the $r$-asymptotics. Thanks! – fuglede May 1 '13 at 15:53
Come to think of it, is it clear that the integral in the expression for $\Psi_{r,g}(m)$ is convergent? The negative powers of $\sin$ scare me. – fuglede May 1 '13 at 17:33
You are right, the proofs of the last two identities need some work! I write down the proofs as soon as possible. The function $\Psi_{r,g}(m)$ is well-defined since $m\in \{ 1,2,…,\lfloor \frac{r}{2}\rfloor \}$. – Philippe Blanc May 2 '13 at 7:38
You will find the r-asymptotics of $\Psi_{r,2}(1)$ in Proposition 3. – Philippe Blanc May 14 '13 at 21:02