# $\cos(x)+\cos(3x)+…\cos(2n-1)x=\sin(2nx)/2\sin(x)$

I need to somehow show that $$\cos(x)+\cos(3x)+...\cos\left((2n-1)\,x\right)=\frac{\sin(2nx)}{2\sin(x)}$$ for some integer $n>0$.

This seems impossible to me since if I consider the left-hand side, I don't know any identity of the form $\cos(ax)+\cos(bx)$. So, I can’t do anything. On the other hand, if I consider the right-hand side, the only identity I know is $\sin(2nx)=2\sin(nx)\cos(nx)$, which doesn’t seem to help me. Finally, Taylor expansion is not helpful either.

How can I show this?

• The identities to add trigonometric functions are very useful. Here they are. – OR. Mar 26 '14 at 21:57
• My first thought is perhaps multiply by $sin(x)$, which would give terms on the left as $cos(nx)sin(x)$ which looks like part of a sine angle addition formula. $sin(a + b) = sin(a)cos(b) + sin(a)cos(b)$ Then you can look at $sin(a - b) = sin(a)cos(b) - sin(b)cos(a)$. Finally, you could write $sin(a)cos(b) = \frac{sin(a + b) + sin(a - b)}{2}$ which gives terms like this: $cos\left((2n - 1)x\right)sin(x) = \frac{sin\left(x + (2n - 1)x\right) + sin\left(x - (2n - 1)x\right)}{2} = \frac{sin\left(2nx\right) + sin\left(2x(n - 1)\right)}{2}$. No idea if that will help though. – Jared Mar 26 '14 at 21:59
• Have you worked with complex numbers? If you have then transforming the trigonometric functions into exponentials will solve this problem. – OR. Mar 26 '14 at 22:00
• Equivalently you can do what Jared is saying. After you break up the products of cosines with the sine into sums, the whole sum will telescope. – OR. Mar 26 '14 at 22:03
• I was searching for it, because this is a classical question, so it was likely to have been asked already. Here it is the computation. – OR. Mar 26 '14 at 22:07

Using the identity $e^{i\theta}+e^{-i\theta}=2\cos(\theta)$, you can express the sum of the cosine terms as:-

$\cos(x)+\cos(3x)+\cdots+\cos((2n-1)x)=\frac{1}{2}(\sum_{k=1}^ne^{j(2k-1)x}+\sum_{k=1}^ne^{-j(2k-1)x})$

The right hand side of the above equation is the sum of two Geometric progressions for the complex exponential terms, where

$$\sum_{k=1}^ne^{j(2k-1)x}=\frac{e^{jx}(1-(e^{j2x})^n)}{1-e^{j2x}}=\frac{e^{jx}-e^{j(2n+1)x}}{1-e^{j2x}}$$

$$\sum_{k=1}^ne^{-j(2k-1)x}=\frac{e^{-jx}(1-(e^{-j2x})^n)}{1-e^{-j2x}}=\frac{e^{-jx}-e^{-j(2n+1)x}}{1-e^{-j2x}}$$

This leads (after some algebraic manipulation) to

$\large \sum_{k=1}^ne^{j(2k-1)x}+\sum_{k=1}^ne^{-j(2k-1)x}=\frac{e^{j(2n-1)x}+e^{-j(2n-1)x}-(e^{j(2n+1)x}+e^{-j(2n+1)x})}{2-(e^{j2x}+e^{-j2x})}\\\large=\frac{2\cos((2n-1)x)-2\cos((2n+1)x)}{2(1-\cos(2x))}=\frac{\cos((2n-1)x)-\cos((2n+1)x)}{1-\cos(2x)}$

Using the sum of angles identities for trigonometry (as stated below)

$\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$

$\cos(a-b)=\cos(a)\cos(b)+\sin(a)\sin(b)$

$\cos(2a)=\cos^2(a)-\sin^2(a)=1-2\sin^2(a)$

we can further simplify the sum of the two Geometric progressions to

$$\frac{\cos(2nx)\cos(x)+\sin(2nx)\sin(x)-\cos(2nx)\cos(x)+\sin(2nx)\sin(x)}{1-1+2\sin^2(x)}\\=\frac{2\sin(2nx)\sin(x)}{2\sin^2(x)}=\frac{\sin(2nx)}{\sin(x)}$$

Thus we have

$$\frac{1}{2}(\sum_{k=1}^ne^{j(2k-1)x}+\sum_{k=1}^ne^{-j(2k-1)x})=\frac{\sin(2nx)}{2\sin(x)}$$

so that the sum of the Cosine terms evaluates as follows:-

$$\cos(x)+\cos(3x)+\cdots+\cos((2n-1)x)=\frac{\sin(2nx)}{2\sin(x)}$$

• thanks for your response, really helpful – loukanikos Mar 27 '14 at 21:09
• You are welcome, and I am glad to help. Although my proof is fairly long, I have tried to detail step by step how to proceed to the answer. – Alijah Ahmed Mar 27 '14 at 21:23

You can prove this by induction. Hints below.

Base case

For $n=1$, choose an appropriate trig identity to expand the numerator $\sin 2nx =\sin 2x$ on the right hand side.

Inductive case

Assume

$$\cos x + \cos 3x + \ldots + \cos ((2n-3)x) = \frac{\sin((2n-2)x)}{2\sin x}$$

This gives

\begin{align} \cos x + \cos 3x + \ldots + \cos ((2n-1)x) &= \frac{\sin((2n-2)x)}{2\sin x} + \cos ((2n-1)x) \\ &=\frac{\sin(2n-2)x + 2\cos ((2n-1)x) \sin x}{2\sin x} \\ &=\frac{\sin(2(n-1)x-x) + 2\cos ((2n-1)x) \sin x}{2\sin x} \end{align}

Then use a trig identity to expand $\sin(2(n-1)x-x)$, simplify and you should see fairly immediately that another trig identity gets you to $2\sin 2nx$ on the numerator.

• thanks, that is much easier and less messy than using complex numbers – loukanikos Mar 27 '14 at 21:11
• @it's a pleasure to help :). When I wrote my answer I guessed you probably wouldn't want complex numbers. But if you were fluent with complex numbers Weirdstress Function's answer would probably be a better way to go -- they tend to be easier than using traditional trig identities once you get used to them. – TooTone Mar 27 '14 at 21:56

Use Euler's identity $$e^{ix}=\cos x + i \sin x$$ So your case can be written as the real part of \begin{align*} \cos x + \cos 3x + \cdots + \cos(2n-1)x +i(\sin x + \sin 3x + \cdots + \sin (2n-1)x ) &= \sum_{k=1}^n e^{i(2k-1)x}\\ &= e^{ix}\frac{e^{2nix}-1}{e^{2ix}-1}\\ &= \frac{\sin 2nx}{2\sin x} + i (\cdots) \end{align*}