Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How can we sum up $\sin$ and $\cos$ series when the angles are in A.P?

I'm curious if there is a simple expression for $$ 1+\cos\theta+\cos 2\theta+\cdots+\cos n\theta $$ and $$ \sin\theta+\sin 2\theta+\cdots+\sin n\theta. $$ Using Euler's formula, I write $z=e^{i\theta}$, hence $z^k=e^{ik\theta}=\cos(k\theta)+i\sin(k\theta)$. So it should be that $$ \begin{align*} 1+\cos\theta+\cos 2\theta+\cdots+\cos n\theta &= \Re(1+z+\cdots+z^n)\\ &= \Re\left(\frac{1-z^{n+1}}{1-z}\right). \end{align*} $$ Similarly, $$ \begin{align*} \sin\theta+\sin 2\theta+\cdots+\sin n\theta &= \Im(z+\cdots+z^n)\\ &= \Im\left(\frac{z-z^{n+1}}{1-z}\right). \end{align*} $$ Can you pull out a simple expression from these, and if not, is there a better approach? Thanks!

share|cite|improve this question

marked as duplicate by Aryabhata, J. M., Rahul, Asaf Karagila, Zev Chonoles Jan 26 '12 at 16:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You can actually write the latter sum as $\Im\left(\frac{1-z^{n+1}}{1-z}\right)$ as well... – J. M. Jan 26 '12 at 0:44
In addition to marty's answer, another approach to this that avoids having to take the real and imaginary parts of awkward-looking expressions is to simply take $\cos(\theta) = 1/2(e^{i\theta}+e^{-i\theta})$ and treat the sums independently - this amounts to the same thing in the end, but some folks seem to find the manipulation easier this way. – Steven Stadnicki Jan 26 '12 at 1:16
up vote 5 down vote accepted

Take the expression you have and multiply the numerator and denominator by $1-\bar{z}$, and using $z\bar z=1$: $$\frac{1-z^{n+1}}{1-z} = \frac{1-z^{n+1}-\bar{z}+z^n}{2-(z+\bar z)}$$

But $z+\bar{z}=2\cos \theta$, so the real part of this expression is the real part of the numerator divided by $2-2\cos \theta$. But the real part of the numerator is $1-\cos {(n+1)\theta} - \cos \theta + \cos{n\theta}$, so the entire expression is:

$$\frac{1-\cos {(n+1)\theta} - \cos \theta + \cos{n\theta}}{2-2\cos\theta}=\frac{1}{2} + \frac{\cos {n\theta} - \cos{(n+1)\theta}}{2-2\cos \theta}$$

for the cosine case. You can do much the same for the case of the sine function.

share|cite|improve this answer
Cool, I wouldn't have thought to multiply through by that. – Jnagy Jan 26 '12 at 6:15
@Jnagy: Basically, any time you want to compute the real or imaginary component of $\frac{a+bi}{c+di}$, you multiply the numerator and denominator by the complement of the denominator, which is $c-di$. That's all I've done here. – Thomas Andrews Jan 26 '12 at 14:12

The answer is "yes", but here are a few more details (absolutely not original with me):

Substitute $z = \exp(i \theta)$ and $z^{n+1} = \exp(i (n+1) \theta)$, use Euler's (not his, but what the heck) formula to get quotients involving $\sin(\theta)$, $\cos(\theta)$, $\sin((n+1))\theta)$, and $\cos((n+1) \theta)$, and then separate the real and imaginary parts.

share|cite|improve this answer
Also a helpful identity here: $1-\cos\,\theta=2\sin^2\frac{\theta}{2}$ – J. M. Jan 26 '12 at 0:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.