I have some problems rearranging exp terms to receive a cos or sin. I guess the solution is silly but I‘m not able to spot my mistake.

I know the solution (since i looked it up with wolfram alpha) has to be a $cos(\pi /4n)$ and therefore $\frac{e^{-j\pi/4n}+ e^{j\pi/4n}}{2}$. My goal is to rearrange the two terms $e^{j\pi/4n}+ e^{j7/4\pi n}$ (devided by 2) to receive this cos. One can clearly see that by removing the $\pi/4$ e term on both sites of $$e^{j\pi/4n}+ e^{j7/4\pi n} =e^{-j\pi/4n}+ e^{j\pi/4n}$$ this remains $$ e^{j7/4\pi n}= e^{-j\pi/4n}$$ wich is true, when its drawn on the unit circle.

If one doesnt see this trick, my usual approach is to split an e term up to make the remaining two e terms conj. compex of each other. Like this $$ e^{j\pi n} \cdot (e^{-j3\pi/4n}+ e^{j3\pi/4n})$$

Saddly this results (as far as I can see) in $(-1)^n\cdot 2cos(3/4\pi n)$, which is not what I‘ve expected. How comes this rearrangement doesn‘t result in the same cos? Is this rearrangement in some cases prohibited?

  • 1
    $\begingroup$ "$−2\cos(3/4\pi n)$, which is complex" um, it's definitely real, unless your $n$ has an imaginary part. $\endgroup$ – Marcus Müller Aug 30 '18 at 6:50
  • $\begingroup$ Oh yeah I see. Have to rewritet this. Thanks! $\endgroup$ – Mr.Sh4nnon Aug 30 '18 at 6:51

If I understand correctly, you're trying to show the following equality:


Note that $e^{\pm jn2\pi}=1$, $n\in\mathbb{Z}$, so you have


and plugging this into Eq. $(1)$ gives you the desired result.

EDIT (answering your comment):

$$e^{jn\pi/4}+e^{j7n\pi/4}=e^{j8n\pi /4}\big(e^{jn\pi/4}+e^{-jn\pi/4}\big)=e^{jn\pi/4}+e^{-jn\pi/4}\tag{3}$$

because $e^{j8n\pi /4}=e^{j2n\pi}=1$.

Your result is also correct because

$$(-1)^n\cos(3\pi n/4)=\cos(n\pi)\cos(3\pi n/4)=\\=\frac12\big(\cos(n\pi/4)+\cos(7n\pi/4)\big)=\cos(n\pi/4)\tag{4}$$

where I used $\cos(x)\cos(y)=\frac12\big(\cos(x-y)+\cos(x+y)\big)$ and $\cos(x\pm 2n\pi)=\cos(x)$.

  • $\begingroup$ yes i know... thats what I already said. Im asking why I cant receive the same by factorization. Taking an e term out (which offten is then a -1 oder 1) and getting two remaining e terms which form a cos or sin. $\endgroup$ – Mr.Sh4nnon Aug 30 '18 at 14:16
  • $\begingroup$ @Mr.Sh4nnon: OK, see my edit. $\endgroup$ – Matt L. Aug 30 '18 at 14:36
  • $\begingroup$ thank you! thats what I was looking for. Still I‘m wondering, was mine false? And if so why? As far as I can see (-1)^ncos(3/4pin) is not the same as cos(pi/4*n) $\endgroup$ – Mr.Sh4nnon Aug 30 '18 at 14:39
  • $\begingroup$ @Mr.Sh4nnon: Yours is correct too, see my new edit. $\endgroup$ – Matt L. Aug 30 '18 at 14:48
  • $\begingroup$ ou... shouldn‘t have trusted wolfran alpha. of course, I see it know. Thanks a lot! $\endgroup$ – Mr.Sh4nnon Aug 30 '18 at 14:51


  1. So you have proved that

    $$\exp\left({j\frac \pi4 n}\right)+ \exp\left({j\frac{7\pi} 4 n}\right) =\exp\left({-j\frac \pi4 n}\right)+ \exp\left({j\frac \pi4 n}\right)$$

  2. The second derivation does results in the same answer as well. It is not prohibited but one would want to simplify things here. It does not help factorizing with a factor $\exp({j\pi n})$ because $\exp({j\pi n}) = \left(-1\right)^n$ and not $-1$. But one could factor by $\exp({j2\pi n})$ for instance since $\exp({j2\pi n}) = 1$. With this in mind:

$$\exp\left({j\frac\pi4n}\right)+ \exp\left({j\frac{7\pi}{4}n}\right)={\exp\left({j2\pi n}\right)}\cdot\left[\underbrace{\exp\left(-j\frac{7\pi}{4}n\right)}_{\exp\left(j\frac{\pi}{4}n\right)}+ \exp\left(-j\frac{1\pi}{4}n\right)\right]$$

And the two forms are identical.

  • $\begingroup$ thank you. @Matt L. already pointed that out. Guess case closed $\endgroup$ – Mr.Sh4nnon Aug 30 '18 at 15:12
  • 1
    $\begingroup$ Good that you edited the $-1$ with $(-1)^n$. $\endgroup$ – Gilles Aug 30 '18 at 15:15

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.