Proving $\sum_{k=1}^{2n-1}\frac{\sin(\frac{\pi k^2}{2n})}{\sin(\frac{\pi k}{2n})}=n$

summationtrigonometry

I wander on the internet and found this problem (from Quora) this link

The problem is proving the identity: $$\sum_{k=1}^{2n-1}\frac{\sin\left(\frac{\pi k^2}{2n}\right)}{\sin\left(\frac{\pi k}{2n}\right)}=n$$

I only can transform this sum to $$2\sum_{k=1}^{n-1}\frac{\sin\left(\frac{\pi k^2}{2n}\right)}{\sin\left(\frac{\pi k}{2n}\right)}+\sin\left(\frac{n\pi}{2}\right)$$
And from this step, I don't know how to process further.
Thank you for reading, any hint or another approach is welcome.

Best Answer

Let $\theta = \pi/n$. Inside each term of the sum, for $k = 1, 2, \ldots, 2n-1$, expand $\sin x$ to $\frac{1}{2i}\left(e^{ix} - e^{-ix}\right)$:

$$\begin{align*} \frac{\sin\frac{k^2 \pi}{2n}}{\sin\frac{k \pi}{2n}} &= \frac{\sin \frac{k^2\theta}{2}}{\sin \frac{k\theta}{2}}\\ &= \frac{e^{ik^2\theta/2} - e^{-ik^2\theta/2}}{e^{ik\theta/2} - e^{-ik\theta/2}}\\ &= \frac{e^{ik\theta/2}}{e^{ik^2\theta/2}}\cdot\frac{e^{ik^2\theta} - 1}{e^{ik\theta} - 1}\\ &= e^{-ik(k-1)\theta/2}\cdot\frac{\left(e^{ik\theta}\right)^k - 1}{e^{ik\theta} - 1}\\ &= \sum_{j=0}^{k-1} \left(e^{i\theta}\right)^{-k(k-1)/2 + jk} \end{align*}$$

The sequences of $-k(k-1)/2+jk$, when arranging the terms in a triangle, are: (up to $k=7 = 2\cdot 4-1$)

$$\require{cancel} \begin{array}{lccccccccccccccc} k=1, &&&&&&&&0\\ k=2, &&&&&&&-1&&1&\\ k=3, &&&&&\rightarrow&-3&\rightarrow&0&\rightarrow&3&\downarrow\\ k=4, &&&&&-6&&-2&&2&&6\\ k=5, &&&&-10&\uparrow&-5&&0&&5&\downarrow&10\\ k=6, &&&-15&&-9&&-3&&3&&9&&15\\ k=7, &\Rightarrow&-21&\Rightarrow&-14&\rlap\Rightarrow\uparrow&-7&\Rightarrow&0 &\Rightarrow&7&\rlap\Rightarrow\downarrow&14&\Rightarrow&21&\Downarrow\\ &\Uparrow&&&&\uparrow&&&&&&\downarrow&&&&\Downarrow\\ \hline &&&&&&&&&\llap{(\text{The non-existent $k=2n$ row:}}&&\cancel{3n}&&&&\cancel{7n})\\ \end{array}$$

Note that there are $n$ "paths" that each goes through the terms in:

  • a row with odd $k$; and
  • if the row is before the final row, i.e. $k< 2n-1$, then two additional columns:
    • the column immediately left of the row, where terms are negative; and
    • the column immediately right of the row, where terms are positive.

(Two example paths for $n=4$ are given above, one in $\Uparrow\Rightarrow\Downarrow$ and one in $\uparrow\rightarrow\downarrow$.)

Each path has $2n-1$ terms, and the terms are in arithmetic progression. Different paths don't go through the same term, and all $n$ paths collectively cover the whole triangle.

For each path, when taking the terms to the $e^{i\theta}$th power, then adding all $2n-1$ complex exponentials together, this becomes a geometric series which equals $1$. Because if continuing the path by one term onto the non-existent $k=2n$ row, this geometric series of $2n$ complex exponentials becomes $0$. But that next exponent of $e^{i\theta}$ would be an odd multiple of $n$, so that extra complex exponential is $-1$.

Adding the $n$ geometric series together give the $n$ on the RHS. $\blacksquare$


By induction

Let $S(a)$ be the statement that

$$\sum_{k=1}^{2a-1} \sum_{j=0}^{k-1} \left(e^{i\theta}\right)^{-k(k-1)/2 + jk} = \sum_{p=1}^{a} \sum_{t=-(a-1)}^{a-1} \left(e^{i\theta}\right)^{t(2p-1)}$$

for $a \in \mathbb N$. The idea is that:

  • The LHS is the partial sum of the sum in the question, up to odd $k=2a-1$.
  • The RHS is the observation that the first $2a-1$ rows of the triangle contains $a$ subpaths, each subpath has $2a-1$ terms in an arithmetic progression.
  • Here $p$ denotes the index for paths, and $t$ denotes the index for the terms on a path.

For $a=1$,

$$\begin{align*} LHS &= \sum_{k=1}^{1} \sum_{j=0}^{k-1} \left(e^{i\theta}\right)^{-k(k-1)/2 + jk}\\ &= \left(e^{i\theta}\right)^{-1(1-1)/2 + 0\cdot1}\\ &= \left(e^{i\theta}\right)^{0}\\ &= \sum_{p=1}^{1} \sum_{t=0}^{0} \left(e^{i\theta}\right)^{t(2p-1)} = RHS \end{align*}$$

Assume that $S(b)$ is true for some $a=b$, $b\in\mathbb N$.

For $a=b+1$,

$$\begin{align*} LHS &= \sum_{k=1}^{2b+1} \sum_{j=0}^{k-1} \left(e^{i\theta}\right)^{-k(k-1)/2 + jk}\\ &= \sum_{k=1}^{2b-1} \sum_{j=0}^{k-1} \left(e^{i\theta}\right)^{-k(k-1)/2 + jk} + \sum_{j=0}^{2b-1} \left(e^{i\theta}\right)^{-2b(2b-1)/2 + j2b} + \sum_{j=0}^{2b} \left(e^{i\theta}\right)^{-(2b+1)2b/2 + j(2b+1)}\\ &= \sum_{p=1}^{b} \sum_{t=-(b-1)}^{b-1} \left(e^{i\theta}\right)^{t(2p-1)} + \sum_{j=0}^{2b-1} \left(e^{i\theta}\right)^{b(2j-2b+1)} + \sum_{j=0}^{2b} \left(e^{i\theta}\right)^{(j-b)(2b+1)}\\ &= \sum_{p=1}^{b} \sum_{t=-(b-1)}^{b-1} \left(e^{i\theta}\right)^{t(2p-1)} + \sum_{j=0}^{b-1} \left(e^{i\theta}\right)^{b(2j-2b+1)} + \sum_{j=b}^{2b-1} \left(e^{i\theta}\right)^{b(2j-2b+1)} + \sum_{j=0}^{2b} \left(e^{i\theta}\right)^{(j-b)(2b+1)}\\ &= \sum_{p=1}^{b} \sum_{t=-(b-1)}^{b-1} \left(e^{i\theta}\right)^{t(2p-1)} + \sum_{p=1}^{b} \overbrace{\left(e^{i\theta}\right)^{b[2(-p)+1]}}^{\text{Replaced $j-b\to -p$}} + \sum_{p=1}^{b} \overbrace{\left(e^{i\theta}\right)^{b[2(p-1)+1]}}^{\text{Replaced $j-b\to p-1$}} + \sum_{t=-b}^{b} \overbrace{\left(e^{i\theta}\right)^{t(2b+1)}}^{\text{Replaced $j-b\to t$}}\\ &= \sum_{p=1}^{b} \sum_{t=-(b-1)}^{b-1} \left(e^{i\theta}\right)^{t(2p-1)} + \sum_{p=1}^{b} \left(e^{i\theta}\right)^{-b(2p-1)} + \sum_{p=1}^{b} \left(e^{i\theta}\right)^{b(2p-1)} + \sum_{t=-b}^{b} \left(e^{i\theta}\right)^{t[2(b+1)-1]}\\ &= \sum_{p=1}^{b} \sum_{t=-b}^{b} \left(e^{i\theta}\right)^{t(2p-1)} + \sum_{t=-b}^{b} \left(e^{i\theta}\right)^{t[2(b+1)-1]}\\ &= \sum_{p=1}^{b+1} \sum_{t=-b}^{b} \left(e^{i\theta}\right)^{t(2p-1)}\\ &= RHS \end{align*}$$

By induction, $S(a)$ is true for all $a\in\mathbb N$, and in particular for $a=n$. Then back to the question,

$$\begin{align*} LHS = \sum_{k=1}^{2n-1} \frac{\sin\frac{k^2 \pi}{2n}}{\sin\frac{k \pi}{2n}} &= \sum_{k=1}^{2n-1} \sum_{j=0}^{k-1} \left(e^{i\theta}\right)^{-k(k-1)/2 + jk}\\ &= \sum_{p=1}^{n} \sum_{t=-(n-1)}^{n-1} \left(e^{i\theta}\right)^{t(2p-1)}\\ &= \sum_{p=1}^{n} \left(e^{i(2p-1)\theta}\right)^{-(n-1)} \frac{\left(e^{i(2p-1)\theta}\right)^{2n-1}-1}{e^{i(2p-1)\theta}-1}\\ &= \sum_{p=1}^{n} \left(e^{i(2p-1)\theta}\right)^{-n} \frac{\left(e^{i(2p-1)\theta}\right)^{2n}- e^{i(2p-1)\theta}}{e^{i(2p-1)\theta}-1}\\ &= \sum_{p=1}^{n} e^{-i(2p-1)\pi}\frac{e^{i(2p-1)2\pi}- e^{i(2p-1)\pi/n}}{e^{i(2p-1)\pi/n}-1}\\ &= \sum_{p=1}^{n} (-1)\frac{1- e^{i(2p-1)\pi/n}}{e^{i(2p-1)\pi/n}-1}\\ &= \sum_{p=1}^{n} 1\\ &= n = RHS\quad \blacksquare \end{align*}$$