6
$\begingroup$

I want to sum up the partials of a harmonic series, how do I do it?

If I was using the 'Lagrange trigonometric identity to solve this problem', how would I plot it on Wolfram mathematica (using which input)?

$\endgroup$
8
  • $\begingroup$ A harmonic series ($\sum \frac1n$) or a sum of sines, $\sum \sin (ka)$? $\endgroup$ Oct 29, 2013 at 19:32
  • $\begingroup$ A sum of sines as described in the question: sina+sin2a+sin3a+...+(n-1)a $\endgroup$
    – Alex
    Oct 29, 2013 at 19:33
  • 2
    $\begingroup$ I asked because the question body speaks of a harmonic series, that is something different. $\endgroup$ Oct 29, 2013 at 19:34
  • $\begingroup$ Basically, I want to show that when a string on a piano is plucked, not only the fundamental frequency of the string plucked eg. 'a' for example resonates, but also multiples of that frequency, such as the octave above....and then I wanted to add these sin waves and create a function from there... $\endgroup$
    – Alex
    Oct 29, 2013 at 19:35
  • 2
    $\begingroup$ Harmonic in music $\neq$ harmonic in mathematics. Not entirely unrelated, but different. Do you already know Euler's formulae relating the exponential function and the trigonometric functions? $\endgroup$ Oct 29, 2013 at 19:38

5 Answers 5

8
$\begingroup$

Using De Moivre's formula, you find that

$$\sin(na)=\mathrm{Im}\left(\left(e^{ia}\right)^n\right)$$

for every real number $a$.

Then, using the linearity of the imaginary part, your sum is clearly equal to the imaginary part of another much simpler sum :

$$\sin(a)+\ldots+\sin((n-1)a)=\mathrm{Im}\left(e^{ia}\right)+\ldots+\mathrm{Im}\left(\left(e^{ia}\right)^{n-1}\right)=\mathrm{Im}\left(e^{ia}+\ldots+\left(e^{ia}\right)^{n-1}\right)$$

If $a$ is an integer multiple of $2\pi$, then your sum is clearly equal to $0$.

If $a$ is not an integer multiple of $2\pi$, then $r=e^{ia}\neq 1$, and the terms of the sum $e^{ia}+\ldots+\left(e^{ia}\right)^{n-1}$ are just the terms of the geometric sequence

$$r,r^2,\ldots,r^{n-1}$$

Now, you should remember that if $(u_n)_{n\geqslant 0}$ is a geometric sequence with ratio $r\neq 1$, then the sum of the $N$ first terms of this sequence is :

$$u_0\frac{r^N-1}{r-1}$$

In our case, we have $u_0=r$ and $N=n-1$, so :

$$e^{ia}+\ldots+\left(e^{ia}\right)^{n-1}=e^{ia}\frac{e^{i(n-1)a}-1}{e^{ia}-1}$$

Now, we'll use this useful formula :

$$\forall \alpha\in\mathbb R,\ e^{i\alpha}-1=2ie^{i\frac\alpha 2}\sin\left(\frac\alpha 2\right)$$

(To prove it, just use the fact that $\sin(\theta)=\dfrac{e^{i\theta}-e^{-i\theta}}{2i}$ for all real number $\theta$ and develop the RHS).

Using this formula on both the numerator and denominator of our latest identity, we get :

$$e^{ia}+\ldots+\left(e^{ia}\right)^{n-1}=e^{ia}\frac{2ie^{i\frac{N-1}2a}\sin\left(\frac{N-1}2a\right)}{2ie^{i\frac a2}\sin\left(\frac a2\right)}=e^{i\frac N2a}\frac{\sin\left(\frac{N-1}2a\right)}{\sin\left(\frac a2\right)}$$

The imaginary part of the RHS is just the sum you wanted :

$$\sin(a)+\ldots+\sin((n-1)a)=\sin\left(\frac N2a\right)\frac{\sin\left(\frac{N-1}2a\right)}{\sin\left(\frac a2\right)}\quad (a\notin 2\pi\mathbb Z)$$

$\endgroup$
2
6
$\begingroup$

They are called Lagrange's trigonometric identities

$$\sum_{n=1}^N \sin (na)= \frac{1}{2}\cot\frac{a}{2}-\frac{\cos(N+\frac{1}{2})a}{2\sin\frac{a}{2}}$$

$$\sum_{n=1}^N \cos(na)= -\frac{1}{2}+\frac{\sin(N+\frac{1}{2})a}{2\sin\frac{a}{2}}$$

Source: http://en.wikipedia.org/wiki/List_of_trigonometric_identities

$\endgroup$
2
  • $\begingroup$ that looks very good, thank you! $\endgroup$
    – Alex
    Oct 29, 2013 at 19:50
  • 1
    $\begingroup$ Do you have a proof for that? $\endgroup$
    – Alex
    Oct 29, 2013 at 19:51
3
$\begingroup$

Hint: Multiple by $\sin\frac{a}{2}$ and use the equality $\sin x\sin y=\frac{1}{2}(\cos(x-y)-\cos(x+y))$:

$$ \sin\frac{a}{2}(\sin a+\sin 2a+\ldots)= \frac{1}{2}(\cos\frac{a}{2}-\cos\frac{3a}{2}+\cos\frac{3a}{2}-\cos\frac{5a}{2}+\ldots) $$ etc.

$\endgroup$
5
  • $\begingroup$ What do you mean by that? Could you show an example? $\endgroup$
    – Alex
    Oct 29, 2013 at 19:42
  • $\begingroup$ I corrected and added the answer. $\endgroup$ Oct 29, 2013 at 19:53
  • $\begingroup$ is it true that all the -cos(3a/2)+cos(3a/2) cancel? $\endgroup$
    – Alex
    Oct 30, 2013 at 12:18
  • $\begingroup$ Yes, of course, except the first and the last summands. $\endgroup$ Oct 30, 2013 at 13:33
  • $\begingroup$ That's a very nice trick! $\endgroup$
    – Prism
    Nov 11, 2013 at 19:18
1
$\begingroup$

$\sin a + \sin2a+\cdots+\sin((n-1)a)$ is the imaginary part of $e^{ia}+e^{2ia}+e^{3ia}+\cdots+e^{(n-1)ia}$. That is a finite geometric series whose sum is expressible in closed form. It will be $\dfrac{\text{something}}{1-e^{ia}}$. Multiplying the top and bottom both by $e^{-ia/2}$ will make it

$$ \frac{\text{something}}{e^{-ia/2}-e^{ia/2}} = 2i\cdot \frac{\text{something}}{\sin(a/2)}. $$

Once it's in that form you only have to look at the numerator to find the imaginary part.

$\endgroup$
1
$\begingroup$

Use the formula $$2\sin(x)\sin(y)= \cos(x-y)-\cos(x+y)$$

Then

$$2\sin(\frac{a}{2})\sin(a)=\cos(\frac{a}{2})-\cos(\frac{3a}{2}) \\ 2\sin(\frac{a}{2})\sin(2a)=\cos(\frac{3a}{2})-\cos(\frac{5a}{2}) \\ 2\sin(\frac{a}{2})\sin(3a)=\cos(\frac{5a}{2})-\cos(\frac{7a}{2}) \\ ....\\ 2\sin(\frac{a}{2})\sin(na)=\cos(\frac{(2n-1)a}{2})-\cos(\frac{(2n+1)a}{2}) \\$$

Add them together.

$\endgroup$
10
  • $\begingroup$ add what together? $\endgroup$
    – Alex
    Oct 29, 2013 at 22:39
  • $\begingroup$ @Alex All these equalities. Note that on the RHS you get a telescopic sum, while on the LHS $2 \sin(\frac{a}{2})$ is a common factor. $\endgroup$
    – N. S.
    Oct 29, 2013 at 22:46
  • $\begingroup$ doesn't your last term already add all these? $\endgroup$
    – Alex
    Oct 29, 2013 at 22:48
  • $\begingroup$ so I would just have to divide the RHS by 2sin(a/2) and then I would have an expression for sin(na)? $\endgroup$
    – Alex
    Oct 29, 2013 at 22:48
  • $\begingroup$ @Alex no it doesn't. The last term is just the relation with $x=\frac{a}{2}$ and $y=na$. $\endgroup$
    – N. S.
    Oct 29, 2013 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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