0

I saw a video of the solution to this problem yesterday and I understand all of it but I wanted to confirm if I am supposed to be able to solve it that way. Here's the solution; $$ \sum_{k=1}^{n} \sin (kx)$$ $$ \sin(x) = \frac{e^{ix}-e^{-ix}}{2i} $$ $$ \sin(kx) = \frac{e^{ikx}-e^{-ikx}}{2i} $$ $$ \sum_{k=1}^{n} \sin(kx) = \frac{1}{2i}\left(\sum_{k=1}^{n} e^{ikx}-\sum_{k=1}^{n} e^{-ikx}\right) $$ $$ = \frac{1}{2i} \left(\sum_{k=1}^{n} \left(e^{ix}\right) ^ {k}-\sum_{k=1}^{n}\left(e^{-i x}\right)^{k}\right) $$ $$ \text { Note: } \sum_{k=1}^{n} x^{k}=\frac{x-x^{n+1}}{1-x}$$ $$ \sum_{k=1}^{n} \sin (kx)=\frac{1}{2i}\left(\frac{e^{ix}-e^{(n+1)ix}}{1-e^{i x}}-\frac{e^{-ix}-e^{-(n+1)ix}}{1-e^{-ix}}\right) $$ $$ =\frac{1}{2i}\left(\frac{e^{i x}\left(1-e^{i n x}\right)}{e^{\frac{ix}{2}}\left(e^{-\frac{ix}{2}}-e^{\frac{ix}{2}}\right)}-\frac{e^{-i x}\left(e^{-i x}-e^{-i m x}\right)}{e^{-\frac{ix}{2}}\left(e^{\frac{ix}{2}}-e^{-\frac{ix}{2}}\right)}\right) $$ $$ =\frac{1}{2i}\left(\frac{e^{\frac{ix}{2}}\left(1-e^{inx}\right)}{-2i \sin \left(\frac{x}{2}\right)}-\frac{e^{-\frac{ix}{2}}\left(1-e^{-inx}\right)}{2i \sin \left(\frac{x}{2}\right)}\right) $$ $$ =\frac{1}{4} \cdot \frac{e^{\frac{ix}{2}}-e^{ix\left(n+\frac{1}{2}\right)}+e^{-\frac{ix}{2}}-e^{-ix\left(n+\frac{1}{2}\right)}}{\sin \left(\frac{x}{2}\right)} $$ $$ =\frac{1}{4} \cdot \frac{e^{\frac{ix}{2}}+e^{-\frac{ix}{2}}-e^{ix\left(n+\frac{1}{2}\right)}-e^{-ix\left(n+\frac{1}{2}\right)}}{\sin \left(\frac{x}{2}\right)} $$ $$ =\frac{1}{4} \cdot \frac{2\cos \left(\frac{x}{2}\right) -2 \cos \left(x\left(n+\frac{1}{2}\right)\right)}{\sin \left(\frac{x}{2}\right)} $$ $$ =\frac{1}{2} \cdot \frac{\cos \left(\frac{x}{2}\right)-\cos \left(nx+\frac{x}{2}\right)}{\sin \left(\frac{x}{2}\right)} $$

My question is that since the formula for geometric sum doesn't work if the geometric ratio is 1, can I use it in this solution as $\mid e^{ix}\mid$ is always 1? Or is there another solution to the question?

Gary
  • 31,845
Ghost
  • 29
  • 2
    The geometric formula does not work if the ratio $e^{ix}$ (not $|e^{ix}|$) is $1$. This means that $x$ should not be of the form $2\pi n$ for integer $n$. This is clear since $\sin(x/2)$ would be $0$ and you do not want to divide by $0$. – Gary Dec 19 '22 at 13:48
  • However it does still work if you slap a $\lim_{x \to 2\pi n}$ on the outside rather than just plugging it in directly. – Ian Dec 19 '22 at 13:51
  • 1
    The geometric series formula $\sum x^k =\frac{1-x^{k+1}}{1-x}$ works for all values of $x\neq1$. The issue is convergence for an infinite sum. But you can sum a finite number of powers, say powers of $2$, and still use the formula. – Clayton Dec 19 '22 at 14:04
  • If you observe $$ \sum_{k=1}^n \sin(kx) = Im \left{ \sum_{k=1}^n e^{ikx} \right} $$ And you calculate the second sum and then take the imaginary part of it you're done. – user8469759 Dec 22 '22 at 03:06
  • Looking at the accepted answer, the question is a duplicate of this one (and the like). – metamorphy Dec 22 '22 at 03:22

1 Answers1

0

Here is a simpler answer.

By using product to sum formula, we have $$\begin{aligned} 2 \sin \frac{x}{2}\left(\sum_{k=1}^{n} \sin k x\right) & =\left(\cos \frac{x}{2}-\cos \frac{3}{2}x\right)+\left(\cos \frac{3}{2}x-\cos \frac{5}{2}x\right)+\cdots \\ & +\left[\cos \left(n-\frac{1}{2}\right) x-\cos \left(n+\frac{1}{2}\right) x\right] \\ & =\cos \frac{x}{2}-\cos\left(n+\frac{1}{2}\right) x. \end{aligned}$$ When $\sin \frac{x}{2} \neq 0$, we have $$\sum_{k=1}^{n} \sin k x=\frac{\cos \frac{x}{2}-\cos\left(n+\frac{1}{2}\right) x}{2 \sin \frac{x}{2}}.$$

Similarly, $$\begin{aligned} 2 \sin \frac{x}{2}\left(\frac{1}{2}+\sum_{k=1}^{n} \cos k x\right) & =\sin \frac{x}{2}+\left(\sin \frac{3}{2} x-\sin \frac{x}{2}\right)+\cdots \\ & +\left[\sin \left(n+\frac{1}{2}\right) x-\sin \left(n-\frac{1}{2}\right) x\right] \\ & =\sin \left(n+\frac{1}{2}\right) x. \end{aligned}$$ When $\sin \frac{x}{2} \neq 0$, we have $$\frac{1}{2}+\sum_{k=1}^{n} \cos k x=\frac{\sin \left(n+\frac{1}{2}\right) x}{2 \sin \frac{x}{2}}.$$

HeroZhang001
  • 2,201