2
$\begingroup$

I want to arrive at a closed expression for $f_N(x)=\frac{2}{π}(\cos x-\cos2x+\cos3x-\cos4x...\pm \cos Nx)$ ($+\cos(Nx)$ if $N$ is odd, $-\cos(Nx)$ if $N$ is even)

Using the fact that $\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$ and $\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$, and by expressing our function as a G.P. with common ratio $-e^{-ix}$, I was able to express $f_N(x)$ (when $N$ is odd) as:

$$(\frac{1}{π}•\frac{e^{Nix}-e^{-Nix}}{1+e^{-ix}})+\frac{1}{π}$$

However I got stuck when I tried to simplify the above equation in terms of trigonometric terms. I was only able to simplify upto:

$$\frac{-1}{π}•\frac{\sin(Nx)•2i}{1+e^{-ix}}+\frac{1}{π}$$

I was a bit worried I had done something wrong while expressing the function as a G.P. but I checked my work and it seems fine.

I guess that the answer lies in some simple manipulation of terms but unfortunately, I was not able to find the solution to this problem.

Appreciate any help :)

$\endgroup$
2
  • $\begingroup$ what kind of simplification you want ? $\endgroup$ Jun 20 '20 at 9:23
  • $\begingroup$ A simplification in terms of sines and cosines, if possible $\endgroup$
    – Kushagra
    Jun 20 '20 at 9:26
1
$\begingroup$

Expanding on @Bernard's answer, for even $N$ the sum is$$\begin{align}\Re\left[e^{ix}\frac{1-e^{iNx}}{1+e^{ix}}\right]&=\Re\left[e^{ix}\frac{-2ie^{iNx/2}\sin\frac{Nx}{2}}{2\cos\frac{x}{2}e^{ix/2}}\right]\\&=\Im\left[e^{i(N+1)x/2}\frac{\sin\frac{Nx}{2}}{\cos\frac{x}{2}}\right]\\&=\frac{\sin\frac{Nx}{2}\cos\frac{(N+1)x}{2}}{\cos\frac{x}{2}},\end{align}$$while for odd $N$ it's$$\Re\left[e^{ix}\frac{1+e^{iNx}}{1+e^{ix}}\right]=\Re\left[e^{i(N+1)x/2}\frac{\cos\frac{Nx}{2}}{\cos\frac{x}{2}}\right]=\frac{\cos\frac{Nx}{2}\cos\frac{(N+1)x}{2}}{\cos\frac{x}{2}}.$$You can unify these e.g. as$$\frac{\sin\left(\frac{Nx}{2}+(1+(-1)^{N+1})\frac{\pi}{4}\right)\cos\frac{(N+1)x}{2}}{\cos\frac{x}{2}}.$$

$\endgroup$
1
  • $\begingroup$ Just what I was looking for. Thanks a lot! $\endgroup$
    – Kushagra
    Jun 20 '20 at 16:54
0
$\begingroup$

Hint:

Here is a fast method:

This alternating sum is the real part of

$$\sum_{k=1}^N (-1)^{k-1}\mathrm e^{ikx}=\mathrm e^{ix}\sum_{\ell=0}^{N-1} (-1)^{\ell}\mathrm e^{i\ell x}=\mathrm e^{ix}\frac{1-(-1)^N\mathrm e^{iNx}}{1+\mathrm e^{ix}}.$$ Now in the numerator of the fraction, factor out $\:\mathrm e^{\tfrac{iN}2}$, and in the denominator, $\:\mathrm e^{\tfrac{ix}2}$. Can you proceed?

$\endgroup$
2
  • $\begingroup$ Not quite: your $1+e^{iNx}$ should be $1-(-e^{ix})^N$. $\endgroup$
    – J.G.
    Jun 20 '20 at 9:37
  • $\begingroup$ @J.G.: Right – I had the case $N$ odd in mind. Thank you for pointing it! $\endgroup$
    – Bernard
    Jun 20 '20 at 9:41

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.