# TrigonometrySimplify cos(a)cos(2a)cos(3a)...cos(999a) if a=(2pi)/1999

#### anemone

##### MHB POTW Director
Staff member
Simplify cos(a)cos(2a)cos(3a)...cos(999a) if a=(2pi)/1999

I don't see any way to approach this problem but my attempt is to group cos(a).cos(999a), then cos(2a).cos(998a), and so on.
Then I get 500 pairs where the first two pairs are 1/2[cos(100a)+cos(998a)] and 1/2[cos(100a)+cos(996a)], and etc.
Next, I see that cos(a)cos(2a)cos(3a)...cos(999a)= 1/2^500[[cos(100a)+cos(998a)][cos(100a)+cos(996a)][cos(100a)+cos(994a)][...].
Now, I'm stuck. I don't know how to proceed.

#### Opalg

##### MHB Oldtimer
Staff member
Simplify cos(a)cos(2a)cos(3a)...cos(999a) if a=(2pi)/1999

I don't see any way to approach this problem but my attempt is to group cos(a).cos(999a), then cos(2a).cos(998a), and so on.
Then I get 500 pairs where the first two pairs are 1/2[cos(100a)+cos(998a)] and 1/2[cos(100a)+cos(996a)], and etc.
Next, I see that cos(a)cos(2a)cos(3a)...cos(999a)= 1/2^500[[cos(100a)+cos(998a)][cos(100a)+cos(996a)][cos(100a)+cos(994a)][...].
Now, I'm stuck. I don't know how to proceed.
(This problem cropped up in the dying days of the Math Help Forum. I'll have to reconstruct an outline of the solution.)

Here's how to compute the product $\displaystyle \prod_{k=1}^n \cos\tfrac{2k\pi}{2n+1} = \cos a\cos2a\cdots\cos na$, where $a = \tfrac{2\pi}{2n+1}.$

To start with, notice that the numbers $\theta = \tfrac{2k\pi}{2n+1}\ (0\leq k\leq 2n)$ are the solutions of the equation $\cos(2n+1)\theta = 1.$ Chebyshev's formula for multiple angle cosines says that $\cos(2n+1)\theta$ is a polynomial of degree $2n+1$ in $\cos\theta$, of the form $$\cos(2n+1)\theta = 2^{2n}\cos^{2n+1}\theta + \ldots \pm(2n+1)\cos\theta.$$ Put $x = \cos\theta$ to see that numbers $\cos\tfrac{2k\pi}{2n+1}\ (0\leq k\leq 2n)$ are the solutions of the equation $$2^{2n}x^{2n+1} + \ldots \pm(2n+1)x - 1 = 0.\quad(*)$$ One of these solutions (corresponding to $k=0$) is $x=1$. The other roots come in pairs, because of the fact that $\cos\varphi = \cos(2\pi-\varphi).$ Thus the roots of $(*)$ are $x=1$ (occurring once), together with the numbers $\cos\tfrac{2k\pi}{2n+1}\ (1\leq k\leq n)$ (occurring twice each). But the product of the roots of $(*)$ is $1/2^{2n}.$ It follows that $\displaystyle \prod_{k=1}^n \cos\tfrac{2k\pi}{2n+1} = \pm\frac1{2^n}.$

The final part of the calculation is to decide whether to take the plus or the minus sign in that formula. Notice that $\cos\theta$ is positive if $0\leq\theta<\pi/2$, and negative if $\pi/2<\theta\leq\pi$. In the above product, roughly the first half of the terms will be positive and the second half will be negative. For small values of n, you can check that the sign is given as in this table: $$\begin{array}{c|c|c|c|c|c|c|c}n&1&2&3&4&5&6&7\\ \hline \text{sign}&-&-&+&+&-&-&+ \end{array}$$ I'll leave you to work out what it should be for $n=999.$

#### anemone

##### MHB POTW Director
Staff member
Thanks, Opalg!

You approach is so easy to follow and I like it very much.
But it's also going uphill to the point where I don't understand why the following is true.

But the product of the roots of $(*)$ is $1/2^{2n}.$ It follows that $\displaystyle \prod_{k=1}^n \cos\tfrac{2k\pi}{2n+1} = \pm\frac1{2^n}.$
Could you please elaborate on that one?
Thanks again.

#### Opalg

##### MHB Oldtimer
Staff member
I don't understand why the following is true.

But the product of the roots of $(*)$ is $1/2^{2n}.$ It follows that $\displaystyle \prod_{k=1}^n \cos\tfrac{2k\pi}{2n+1} = \pm\frac1{2^n}.$
Could you please elaborate on that one?
The roots of $(*)$ are $\cos\tfrac{2k\pi}{2n+1}\ (1\leq k\leq n)$ (occurring twice each), together with 1. So their product is $\displaystyle \Bigl(\prod_{k=1}^n \cos\tfrac{2k\pi}{2n+1}\Bigr)^{\!\!\!2}.$ But the product of the roots of a polynomial of odd degree is the negative of the constant term divided by the coefficient of the leading term. Therefore $\displaystyle \Bigl(\prod_{k=1}^n \cos\tfrac{2k\pi}{2n+1}\Bigr)^{\!\!\!2} = \frac1{2^{2n}}.$ Now you just have to take the square root of both sides.

#### anemone

##### MHB POTW Director
Staff member
With the awesome explanation, there's no reason to say that I don't understand!
BIG thanks to you, Opalg!
Also, big thanks to this site!

#### melese

##### Member
Here's what I tried:

From $\displaystyle(2n+1-(2k-1))a=(2n+1-(2k-1))\frac{2\pi}{2n+1}=2\pi-(2k-1)\frac{2\pi}{2n+1}=2\pi-(2k-1)a$, it follows that $\sin{(2n+1-(2k-1))a}=\sin(-(2k-1)a)=-\sin{(2k-1)a}$. So we simply have, $\displaystyle\frac{\sin{(2n+1-(2k-1))a}}{{\sin(2k-1)a}}=-1$(*).

The identity $\sin(2\alpha)=2\sin(\alpha)\cos(\alpha)$, or $\displaystyle \cos(\alpha)=\frac{1}{2}\frac{\sin(2\alpha)}{\sin(\alpha)}$ gives:$\prod_{1\leq k\leq n}\cos(ka)=\prod_{1\leq k\leq n}\frac{1}{2}\frac{\sin(2ka)}{\sin(ka)}=\frac{1}{2^n}\prod_{1\leq k\leq n}\frac{\sin(2ka)}{\sin(ka)}=\frac{\sin(2a)}{\sin(1a)}\cdot\frac{\sin(4a)}{\sin(2a)}\cdot\frac{\sin(6a)}{\sin(3a)}\cdot\frac{\sin(8a)}{\sin(4a)}\cdots\frac{\sin(2na)}{\sin(na)},$where the RHS product $A_n$ (without $\displaystyle\frac{1}{2^n}$) after cancellation is something like (for $n=6$)$\displaystyle A_6=\frac{\sin(2a)}{\sin(1a)}\cdot \frac{\sin(4a)}{\sin(2a)}\cdot\frac{\sin(6a)}{\sin(3a)}\cdot\frac{\sin(8a)}{\sin(4a)}\cdot\frac{\sin(10a)}{\sin(5a)}\cdot\frac{\sin(12a)}{\sin(6a)}= \frac{1}{\sin(1a)} \cdot\frac{1}{1}\cdot\frac{1}{\sin(3a)}\cdot\frac{\sin(8a)}{1}\cdot\frac{\sin(10a)}{\sin(5a)} \cdot\frac{\sin(12a)}{1}=\frac{\sin(8a)}{\sin(1a)}\cdot\frac{\sin(10a)}{\sin(3a)} \frac{\sin(12a)}{\sin(5a)}$.

Rearanging the numerator, we get: $A_n=\displaystyle \frac{\sin(2na)}{\sin(1a)}\cdot\frac{\sin((2n-2)a)}{\sin(3a)}\cdot\frac{\sin((2n-4)a)}{\sin(5a)}\cdots=\frac{\sin{(2n+1-1)a}}{{sin1a}}\cdot\frac{\sin{(2n+1-3)a}}{{\sin3a}}\cdots\frac{\sin{(2n+1-(2t-1))a}}{{\sin(2t-1)a}}=\prod_{1\leq k\leq t}\frac{\sin{(2n+1-(2k-1))a}}{{\sin(2k-1)a}},$ where (by inspection) $t=\lfloor (n+1)/2\rfloor$.

But then from (*), we immediately find that $A_n=\prod_{1\leq k\leq t}(-1)=(-1)^t$. Finally, $\displaystyle\prod_{1\leq k\leq n}\cos(ka)=\frac{1}{2^n}A_n=\frac{1}{2^n}(-1)^t$.

Note: Since $\frac{n(n+1)}{2}$ and $t$ have the same parity, the answer may be written as: $\displaystyle\prod_{1\leq k\leq n}\cos(ka)=\frac{(-1)^{\frac{n(n+1)}{2}}}{2^n}$.

መለሰ