# Lagrange's Trigonometric Identity

Lagrange's Trig identity is $$1+\cos\theta+\cos 2\theta +\cdots + \cos n \theta=\frac{1}{2}+\frac{\sin\frac{(2n+1)\theta}{2}}{2\sin \frac{\theta}{2}},\quad (0<\theta <2\pi).$$ How can we prove this identity using series method and complex variables? I tried to use $$\sum_{n=0}^\infty z^n=\frac{1}{1-z}\quad |z|<1$$ and writing left hand side as $$\sum_{n=0}^\infty (\cos \theta)^n=\frac{1}{2}+\frac{\sin\frac{(2n+1)\theta}{2}}{2\sin \frac{\theta}{2}}.$$ Re-arranging this I get $$\sum_{n=0}^\infty (\cos \theta)^n-\frac{1}{2}=\frac{1}{2}+ \sum_{n=1}^\infty (\cos \theta)^n=\frac{\sin\frac{(2n+1)\theta}{2}}{2\sin \frac{\theta}{2}}.$$ Now if I deal with the right hand side $$2\sin \frac{\theta}{2}=2\Im (e^{i\theta/2} ),\quad \sin\frac{(2n+1)\theta}{2}=\Im \big(e^{i(2n+1)\theta/2}\big).$$ This is where I am stuck now. Thank you for reading

-
"Accepting" an answer within minutes after posting has certain disadvantages. –  Michael Hardy May 18 '14 at 16:47
@Gregory Something to consider: People are volunteering to try and help you answer this question; leaving numerous comments throughout the thread announcing downvotes is perhaps not the best way to respond to answers. –  user61527 May 18 '14 at 18:57
The formula in the third display line, after "and writing left hand side as" is wrong, as is each of the equations on next display line. –  John Bentin May 18 '14 at 19:18
I've deleted many comments here that were not on-topic. Be nice, and show respect. –  mixedmath May 19 '14 at 8:48

If $S = 1+z+z^2+\cdots+z^n$, then $$S-zS=(1+z+z^2+\cdots+z^n)-(z+z^2+z^3+\cdots+z^{n+1})=1-z^{n+1}.$$ Therefore, $S=\frac{1-z^{n+1}}{1-z}$, with $z \not=1$. Equating both expressions of $S$, we have $$1+z+z^2+\cdots+z^n=\frac{1-z^{n+1}}{1-z}$$ Substitute $z=e^{i\theta}$, with $0 < \theta < 2\pi$, into the expression, and we get $$1+e^{i\theta}+e^{2i\theta}+\cdots+e^{ni\theta}=\frac{1-e^{(n+1)i\theta}}{1-e^{i\theta}}$$ The real component of the left side is $1+\cos\theta+\cos 2\theta + \cdots + \cos n\theta$. For the right side, the real component is (skipping a few steps on this one, but it is) $$\frac{1}{2}+\frac{\sin \frac{(2n+1)\theta}{2}}{2 \sin \frac{\theta}{2}}$$ If we equate the real components from both sides, we get $$1+\cos\theta+\cos 2\theta + \cdots + \cos n\theta=\frac{1}{2}+\frac{\sin \frac{(2n+1)\theta}{2}}{2 \sin \frac{\theta}{2}}$$

-
I understand all of this thank you for proving everything –  user143444 May 18 '14 at 16:37

Here's a proof that doesn't involve complex numbers. Multiply the LHS through by $2\sin\!\frac12\!\theta$. Notice that each term of the form $2\cos{k\theta}\sin\!\frac12\!\theta\;(k=0,...,n)$ can be expressed as $\sin{(k+\frac12)}\theta-\sin{(k-\frac12)}\theta$, by a standard trig identity. In this form, the series telescopes, with the first term of each difference cancelling the second (subtracted) term of the next one, leaving just $\sin{\frac12\!\theta}$ at the beginning and $\sin{(n+\frac12)\theta}$ at the end. Now divide by the original multiplier $2\sin\!\frac12\!\theta$, and you are home.

If you want to convert this simple proof to one that involves complex numbers, just express each sine and cosine in complex-exponential form. (It isn't quite as neat to write down as the trigonometric version, however.)

-
-1 I asked for a proof that involved complex variables. –  user143444 May 18 '14 at 18:07
+1 for a nice and concise proof. –  user61527 May 18 '14 at 18:49

Hint

$$\sum_{k=0}^n\cos(k\theta)=\Re\left(\sum_{k=0}^n e^{ik\theta}\right)=\Re\left(\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}\right)$$ Can you take it from here?

Edit Now we have

$$\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}=\frac{e^{i(n+1)\theta/2}}{e^{i\theta/2}}\frac{e^{-i(n+1)\theta/2}-e^{i(n+1)\theta/2}}{e^{-i\theta/2}-e^{i\theta/2}}=e^{in\theta/2}\frac{\sin((n+1)\theta/2)}{\sin(\theta/2)}$$ so the real part is $$\cos(n\theta/2)\frac{\sin((n+1)\theta/2)}{\sin(\theta/2)}$$ Finally use the relation (with $p=n\theta/2$ and $q=(n+1)\theta/2$)

$$\cos p\sin q=\frac12(\sin(q+p)+\sin(q-p))$$ to get the desired result.

-
I know this is correct, but I don't understand what to do from here actually. This is the hint that is in my textbook. I didn't use this method because I didn't understand it. can you elaborate more please –  user143444 May 18 '14 at 16:27
Yes I'll edit my answer. –  Sami Ben Romdhane May 18 '14 at 16:28
Thanks a lot I will check it as the answer after I understand what you do, however i may have another question to ask :) –  user143444 May 18 '14 at 16:29
I edited my answer. –  Sami Ben Romdhane May 18 '14 at 16:40
Well may I see one thing clear then others see it blur;-) anyway you're welcome. –  Sami Ben Romdhane May 18 '14 at 16:47

\begin{align} \sum_{k=0}^n\cos(k\theta) &=\frac12\sum_{k=0}^n\left(\color{#C00000}{e^{ik\theta}}+\color{#C000C0}{e^{-ik\theta}}\right)\tag{1}\\ &=\frac12\left(\color{#C00000}{\frac{e^{i(n+1)\theta}-1}{e^{i\theta}-1}}+\color{#C000C0}{\frac{e^{-i(n+1)\theta}-1}{e^{-i\theta}-1}}\right)\tag{2}\\ &=\frac12\left(\frac{\color{#00A000}{e^{i(n+1/2)\theta}-e^{-i\theta/2}}}{e^{i\theta/2}-e^{-i\theta/2}} +\frac{\color{#0000FF}{e^{i\theta/2}-e^{-i(n+1/2)\theta}}}{e^{i\theta/2}-e^{-i\theta/2}}\right)\tag{3}\\ &=\frac12\left(\frac{\color{#00A000}{e^{i(n+1/2)\theta}}\color{#0000FF}{-e^{-i(n+1/2)\theta}}}{e^{i\theta/2}-e^{-i\theta/2}} +\frac{\color{#0000FF}{e^{i\theta/2}}\color{#00A000}{-e^{-i\theta/2}}}{e^{i\theta/2}-e^{-i\theta/2}}\right)\tag{4}\\ &=\frac12\left(\frac{\sin((2n+1)\theta/2)}{\sin(\theta/2)}+1\right)\tag{5} \end{align} Explanation:
$(1)$: rewrite cosine: $\cos(x)=\dfrac{e^{ix}+e^{-ix}}{2}$
$(2)$: sum of geometric series: $\sum\limits_{k=0}^nr^k=\dfrac{r^{n+1}-1}{r-1}$
$(3)$: multiply the left fraction by $\dfrac{e^{-i\theta/2}}{e^{-i\theta/2}}$ and the right fraction by $\dfrac{-e^{i\theta/2}}{-e^{i\theta/2}}$
$(4)$: shuffle terms $\vphantom{\dfrac{e^{-i\theta/2}}{e^{-i\theta/2}}}$
$(5)$: rewrite sine: $\sin(x)=\dfrac{e^{ix}-e^{-ix}}{2i}$

-
Wow, that was a fast downvote. Care to comment? –  robjohn May 18 '14 at 18:02
This is just recycled version of others answers. If you cannot provide an original answer, there is no need to post an answer when I already checked an answer. -1. I didn't down vote twice though. –  user143444 May 18 '14 at 18:05
@robjohn Any particular reason why your answer is color-coded? I can't see how they contribute to the clarification, unfortunately, if so many different colors are employed. –  les guimauves May 18 '14 at 18:42
@glacier: I was hoping it might show where things moved: the red from one line becomes the red in the next line, etc. If it is too confusing, I can remove it. –  robjohn May 18 '14 at 18:47
+1; I actually do like the colors used here - just look at the two pairs of colored lines separately (and I'm finding the OP's numerous comments here announcing downvotes on various answers to be getting repetitive). –  user61527 May 18 '14 at 18:51