I am trying to convert the following discrete time signal to continuous time:
$$h[n]= \begin{cases} (-1)^n, & 0\leq n \leq 3 \\ 0, & \text{otherwise} \end{cases}$$
Using the transform pair:
$$a^n u[n] \leftrightarrow \frac{1}{1 +ae^{-j\Omega}}$$
gives:
$$H(\Omega) = \frac{1}{1 - e^{-j\Omega}}$$
However, this doesn't take into account the upper bound.
I think this problem may involve recognizing that $$(-1)^{n}==\cos[t\cdot\pi]$$
But I am not sure where to go from here.
The solution is
$$H(\Omega) = \begin{cases} \frac{1-e^{-j4\Omega}}{1+e^{-j\Omega}}, & \text{if $-e^{-j\Omega} \ne 1$} \\ 4, & \text{if $\Omega = k\pi$, k odd} \end{cases}$$
Which can also be written as
$$H(\Omega) = je^{-j3\Omega/2} \frac{\sin(2\Omega)}{\cos(\Omega/2)}$$
Thanks.