# trigonometric identity needed for sums involving secants

I am looking for a closed-form formula for the following sum:

$\displaystyle \sum_{k=0}^{N}{\frac{\sin^{2}(\frac{k\pi}{N})}{a \cdot \sin^{2}(\frac{k\pi}{N})+1}}=\sum_{k=0}^{N}{\frac{1}{a+\csc^{2}(\frac{k\pi}{N})}}$.

Is such a formula known?

-
You mean to sum from $k=0$ to $N$, not from $j=0$ to $k$, right? – Will Sawin Feb 18 '13 at 22:07
@WillSawin: Right, thanks. Fixed it. – Felix Goldberg Feb 18 '13 at 22:13
I recommend making the title more specific, and include the summation. You could even change the summand to something like 1/(a + csc^2(stuff)) to make it more line-friendly. (I wonder if change of variables would give log(some trig expression) as an answer?) Gerhard "Ask Me About Friendly Lines" Paseman, 2013.02.18 – Gerhard Paseman Feb 18 '13 at 22:20
Secant? Really? Gerhard "Was Cosecant In My Schooldays" Paseman, 2013.02.18 – Gerhard Paseman Feb 18 '13 at 22:43
@Gerhard: this co business can be co-nfusing at times. – Felix Goldberg Feb 18 '13 at 23:29

Two other references to similar sums are

Bruce C. Berndt and Boon Pin Yeap, Explicit evaluations and reciprocity theorems for finite trigonometric sums, Advances in Applied Mathematics Volume 29, Issue 3, October 2002, Pages 358--385

and

Ira Gessel, Generating Functions and Generalized Dedekind Sums, Electronic J. Combinatorics, Volume 4, Issue 2 (1997) (The Wilf Festschrift volume), R11.

The paper of Berndt and Yeap uses contour integration and has an extensive list of references. My paper uses elementary methods, including partial fractions.

Here are the details of the partial fraction approach:

First we convert the trigonometric sum to a sum over roots of unity. Let $\eta_k=e^{k\pi i /N}$ and let $\zeta_k=\eta_k^2 = e^{2k\pi i/N}$. Then \begin{equation*} \csc^2(k\pi/N) = \left(\frac{2i}{\eta_k -\eta_k^{-1}}\right)^2 =\frac{-4\eta_k^2}{(\eta_k^2-1)^2} =\frac{-4\zeta_k}{(\zeta_k-1)^2}. \end{equation*} Thus (since the summand vanishes for $k=0$) the sum is \begin{equation*} \sum_{\zeta^N=1} \frac{1} {a-4\zeta/(\zeta-1)^2} =\sum_{\zeta^N=1} \frac{(\zeta-1)^2}{a(\zeta-1)^2 - 4\zeta}. \end{equation*} To apply the partial fraction method, we need to find the partial fraction expansion of \begin{equation*} F(z)=\frac{(z-1)^2}{a(z-1)^2 - 4z} \end{equation*} Factoring the denominator shows that we can simplify things if we make the substitution $a=4c/(c-1)^2$, so that \begin{equation*} c = \frac{a+2+2\sqrt{a+1}}{a}. \end{equation*} Then we have \begin{equation*} F(z) =\frac{(c-1)^2}{4c} +\frac{(c-1)^3}{4(c+1)}\left(\frac{1}{z-c} -\frac{1}{c(cz-1)}\right) \end{equation*} We have \begin{equation*} \sum_{\zeta^N=1} (\zeta-c)^{-1} = - \frac{Nc^{N-1}}{c^N-1} \end{equation*} and \begin{equation*} \sum_{\zeta^N=1} (c\zeta-1)^{-1} = \frac{N}{c^N-1} \end{equation*} So the sum is \begin{equation*} \sum_{\zeta^N=1} F(\zeta) = N\frac{(c-1)^2}{4c} \left(1-\frac{(c-1)}{(c+1)}\frac{(c^N+1)}{(c^N-1)}\right). \end{equation*} where $c=(a+2+2\sqrt{a+1})/a$. In terms of $a$, we can simplify this a little to \begin{equation*} \frac{N}{a} \left(1-\frac{1}{\sqrt{a+1}}\frac{(c^N+1)}{(c^N-1)}\right). \end{equation*} If you really want an expression which is rational in $a$, it's possible to write this as a quotient of polynomials in $a$ that are given by generating functions.

-
Thanks! Eventually I found out these two papers, after aaking gHe question and learnt a lot from them. I did manage to reduce the expression to a sum of elementary fractions - but that's where I got stuck because unlike in the usual case my sum runs over only half of te roots of unity and not all of them. Do you kow of a way to surmount this difficulty? – Felix Goldberg Feb 21 '13 at 4:08
I have edited my post to include the full solution. – Ira Gessel Feb 21 '13 at 16:35
This is a really great exposition but I think I stated my difficulty very poorly: I want to handle also the case when the sum runs only over the even numbers from $0$ to $N$ (assume $N$ itself is odd). (I'm not sure it'd be a good idea to edit the question at this stage, so I'm stating the modification here). That's where I got stuck, because I don't know how to sum only over the even ones - is there another trick that handles this case? Thanks again! – Felix Goldberg Feb 21 '13 at 17:21
You can still try the partial fraction expansion, but it probably won't simplify as much. Is there any reason to think that there's a simple formula for this case? – Ira Gessel Feb 22 '13 at 14:29

I think that the following article of our very own Roberto Bosch Cabrera might come in handy:

Specifically, you should take a look at pages 1 & 2 of that note.

-
Thanks, this looks extremely promising! – Felix Goldberg Feb 19 '13 at 1:16

This may not be of much (any!) help, but Mathematica 7 gives a closed-form solution in terms of QPolyGamma functions:

$\frac{\psi _{e^{-\frac{2 i \pi }{n}}}^{(0)}\left(1-\frac{\log \left(\frac{a-2 \sqrt{a+1}+2}{a}\right)}{\log \left(e^{-\frac{2 i \pi }{n}}\right)}\right)-\psi _{e^{-\frac{2 i \pi }{n}}}^{(0)}\left(n-\frac{\log \left(\frac{a-2 \sqrt{a+1}+2}{a}\right)}{\log \left(e^{-\frac{2 i \pi }{n}}\right)}+1\right)+\sqrt{a+1} n \log \left(e^{-\frac{2 i \pi }{n}}\right)}{a \sqrt{a+1} \log \left(e^{-\frac{2 i \pi }{n}}\right)}$

$+$

$\frac{\psi _{e^{-\frac{2 i \pi }{n}}}^{(0)}\left(n-\frac{\log \left(\frac{a+2 \sqrt{a+1}+2}{a}\right)}{\log \left(e^{-\frac{2 i \pi }{n}}\right)}+1\right)-\psi _{e^{-\frac{2 i \pi }{n}}}^{(0)}\left(1-\frac{\log \left(\frac{a+2 \sqrt{a+1}+2}{a}\right)}{\log \left(e^{-\frac{2 i \pi }{n}}\right)}\right)}{a \sqrt{a+1} \log \left(e^{-\frac{2 i \pi }{n}}\right)}$

$\psi^{(0)}_q$ is the q-PolyGamma function.

-