# How is this was derived? DTFT for symmetric pulse

do not understand how the middle expression was derived from above expression,

after all summation\multiplication i get:

$$\frac{e^{-jwN} + e^{jwN} - e^{-jw(N+1)} + e^{jw(N+1)}}{2 - e^{-jw} - e^{jw}}$$

• what was the original question? what's the range of pulse in $n$ ? – Fat32 Dec 16 '17 at 0:36
• @Fat32 from -N to N inclusive. But I don't think it really matters, I think it's just a matter of arithmetic manipulation only. – qqffx Dec 16 '17 at 0:40
• it does not matter for the DTFT magnitude but it matters for the phase of the filter which is dependent on the summing range. So you have this summation: $$X(e^{j \omega}) = \sum_{n=-N}^{N} e^{-j \omega n}$$ ? – Fat32 Dec 16 '17 at 0:44
• @Fat32 yes, I add the whole derivation) I just didn't get how they transform this to Euler function for sinusoid. So I want to know the trick) – qqffx Dec 16 '17 at 0:48

First, the following trick will be useful: $$e^{j a} - e^{j b} = e^{j \frac{a+b}{2}} \left( e^{j \frac{a-b}{2}} - e^{j \frac{b-a}{2}} \right)$$
Then simply expand the sum as: $$X(e^{j\omega}) = \sum_{n=-N}^{N}e^{-j\omega n} = \frac{ e^{-j\omega (-N)} - e^{-j\omega (N+1)} }{1 - e^{-j\omega}} = \frac{ e^{j\omega N} - e^{-j\omega (N+1)} }{1 - e^{-j\omega}}$$
Apply the trick to the numerator and denominator by recognising $a$ and $b$ carrefully: for the numerator $a=\omega N$ and $b=-\omega (N+1)$ whereas for the denominator $a=0$ and $b=-\omega$ which yields:
$$X(e^{j\omega}) = \frac{ e^{j\omega N} - e^{-j\omega (N+1)} }{1 - e^{-j\omega}} = \frac{ e^{j \frac{\omega N -\omega (N+1) }{2}} \left( e^{j\frac{\omega N +\omega (N+1) }{2}} - e^{-j\frac{\omega N +\omega (N+1) }{2}} \right) }{ e^{-j\omega/2} \left( e^{j\omega/2} - e^{-j\omega/2} \right) }$$
which simplifies to: $$X(e^{j\omega}) = \frac{ e^{-j\omega/2} \left( e^{j\frac{\omega N +\omega (N+1) }{2}} - e^{-j\frac{\omega N +\omega (N+1) }{2}} \right) }{ e^{-j\omega/2} \left( e^{j\omega/2} - e^{-j\omega/2} \right) } = \frac{ e^{j \omega \frac{2N+1 }{2}} - e^{-j \omega \frac{2N+1}{2}} }{ e^{j\omega/2} - e^{-j\omega/2} }$$
which is: $$X(e^{j\omega}) = \frac{ \sin( \omega (N+\frac{1}{2}) )}{ \sin( \omega \frac{1}{2}) }$$