I am trying to create a discrete-time filter with a Fourier transform as follows.
$X(\omega) = \begin{cases} 1, & T - W \leq \omega \leq T + W\\ 0, & \text{all other values of } \omega \end{cases}, $
Looking at the provided solution, I have understood that the idea is to create a low-pass filter and then translate it in the frequency domain by $T$.
For the low-pass filter I've got the following time-domain function.
$x(n) = \frac{2}{\pi}\frac{\sin(Wn)}{n}$$x(n) = \frac{1}{\pi}\frac{\sin(Wn)}{n}$
To translate a function in frequency, it can be multiplied in the time domain by $e^{jTn}$. In the solution, they have first stated that this is correct, but in the final answer they have instead multiplied it by $2\cos(Tn)$. They also wrote that $2\cos(Tn) = e^{jTn}+e^{-jTn}$, which I have no problem with, but I don't understand why they went for this instead of $e^{jTn}$.
So to be clear, my question is: why did they multiply the low-pass filter by $2\cos(Tn)$ instead of $e^{jTn}$ to translate it in the frequency domain?