# Challenge 13: Sums of Sines

1. Jan 7, 2014

### Office_Shredder

Staff Emeritus
Prove that
$$\sum_{k=0}^{n} \sin\left( \frac{k \pi}{n} \right) = \cot \left( \frac{\pi}{2n} \right)$$

2. Jan 7, 2014

### Citan Uzuki

This is a fairly straightforward calculation:

\begin{align*}\sum_{k=0}^{n} \sin\left(\frac{k\pi}{n}\right) &= \Im \left(\sum_{k=0}^{n} \exp \left(\frac{k\pi i}{n} \right) \right) \\ &= \Im \left( \frac{1 - \exp \left(\frac{(n+1)\pi i}{n}\right)}{1 - \exp \left(\frac{\pi i}{n}\right)}\right)\\ &= \Im \left( \frac{1+\exp \left(\frac{\pi i}{n}\right)}{1 - \exp \left(\frac{\pi i}{n}\right)}\right)\\ &= \Im \left(\frac{\exp \left(-\frac{\pi i}{2n}\right) + \exp \left(\frac{\pi i}{2n} \right)}{\exp \left(-\frac{\pi i}{2n}\right) - \exp \left(\frac{\pi i}{2n}\right)}\right) \\ &= \Im \left(\frac{2 \cos \left(-\frac{\pi }{2n}\right)}{2i \sin \left(-\frac{\pi}{2n} \right)}\right) \\ &= \Im \left(-i \cot \left(-\frac{\pi}{2n} \right) \right) \\ &= \Im \left(i \cot \left(\frac{\pi}{2n} \right)\right) \\ &= \cot \left(\frac{\pi}{2n} \right) \end{align*}

3. Jan 7, 2014

### jbunniii

Here's another calculation:
\begin{align} \sin\left(\frac{\pi}{2n}\right) \sum_{k=0}^{n} \sin\left(\frac{k\pi}{n}\right) &= \sum_{k=0}^{n} \sin\left(\frac{k\pi}{n}\right) \sin\left(\frac{\pi}{2n}\right) \\ &= \frac{1}{2} \sum_{k=0}^{n} \left[ \cos\left( \frac{(2k-1)\pi}{2n}\right) - \cos\left(\frac{(2k+1)\pi}{2n}\right) \right] \\ \end{align}
The sum telescopes, so the above reduces to
\begin{align} \frac{1}{2} \left[ \cos\left(-\frac{\pi}{2n}\right) - \cos\left(\frac{(2n+1)\pi}{2n}\right) \right] &= \frac{1}{2}\left[ \cos\left(\frac{\pi}{2n}\right) - \cos\left(\pi + \frac{\pi}{2n}\right) \right] \\ &= \frac{1}{2} \left[\cos\left(\frac{\pi}{2n}\right) + \cos\left(\frac{\pi}{2n}\right)\right] \\ &= \cos\left(\frac{\pi}{2n}\right) \end{align}
Dividing both sides by $\sin\left(\frac{\pi}{2n}\right)$ gives us what we want.

4. Jan 8, 2014

### Office_Shredder

Staff Emeritus
Those are some nice solutions! Anyone have another way of doing the calculation?

5. Jan 11, 2014

### chingel

The sum is also the distance between opposite sides of a regular polygon with 2n sides of length 1, from where the result comes with simple geometry.

6. Jan 12, 2014

### CosmicKitten

I stumbled upon a really complicated way to d0 it by induction... too tired now to do the arithmetic and see if it works right now. After easily establishing that both sides equal 0 for n=1, it involves turning the right side into the form (e^ipi/n + 1)/(e^ipi/n -1) and multiplying the numerator and the denominator by e to the power of (i*pi/n^2)/(1+1/n) which turns the denominator of the exponent into n+1 without changing the numerator, but it changes the 1 on the numerator and the -1 in the denominator so you must add something to make them turn back into 1 and -1 without changing the e^ipi/n+1's. So add A/B to that and solve for A and B and then add A/B to the other side and see if you can get it in the n+1 form. Is that on the right track?

7. Jan 17, 2014

### Office_Shredder

Staff Emeritus
It might work, why don't you try going through the details to see if you can hammer it out?

chingel, that's a pretty cool way of attacking this problem. Can you explain a bit more how the geometry works out to give it?

8. Jan 17, 2014

### chingel

Since on an x-y plane the sine is the vertical projection of a segment of length 1 at a particular angle and we are trying to find the sum of sines, that is the sum of the vertical projections, we can add up all the segments and then find the vertical projection of the sum. Noticing that the angles increase with regular intervals and that the segments make up half of an 2n-gon, then the vertical projection of the sum is just twice the apothem of the 2n-gon and using the well known simple formula for the apothem we get the answer.

http://www.buzzle.com/articles/finding-apothem-of-a-regular-polygon.html

9. Jan 17, 2014

### Office_Shredder

Staff Emeritus
This is a very cool proof.