# How to take the linear convolution of these two signals?

How do I perform the linear convolution of the following two signals? I am having trouble relating $x[n]$ to a series of points, like was given by $h[n]$ below.

$$x[n] = e^{j\pi n}\left\{{u[n]}-u[n-8]\right\}\quad\text{and}\quad h[n] = (-1)^{n}\left\{{u[n]}-u[n-4]\right\}$$

$x[n]$ is a finite-length sinewave of length $L=8$, and $h[n]$ is a causal filter of length $M=4$, expressed as $h[n]=\{1,-1,1,-1\}$.

The solution is: $y[n]=\{1,-2,3,-4,4,-4,4,-4,3,-2,1\}$

For $n = 1\ldots 8$ $$x[n] = e^{j\pi n}\{{u[n]}-u[n-8]\} = (-1)^{n}$$ and for $n = 0\ldots 3$ $$h[n] = (-1)^n$$ Else, if $n > 8$ or $n < 1$, then $x[n] = 0$. Similarly, if $n < 0$ and $n > 3$ then $h[n] = 0$. Using the definition of convolution, $$y[k] =(h * x)[k] = \sum\limits_{m = 0}^3 h[m]x[k-m]$$ For $k = 1$ $$y =(h * x) = hx = 1$$

For $k = 2$ $$y =(h * x) = hx + hx = -1 -1 = -2$$ $\vdots$

For $k = 5$ $$y =(h * x) = hx + hx + hx + hx= 1 +1 + 1 +1 = 4$$ $\vdots$

For $k = 8$ $$y =(h * x) = hx + hx + hx + hx= -1 -1 - 1 -1 = -4$$

$\vdots$

For $k = 11$ $$y =(h * x) = hx + hx + hx + hx= 0 + 0 + 0 + 1 = 1$$

• P.S: This is the easy way. Another possible way is to make use of the convolutions of shifted versions of the step function $u[n]$. – Ahmad Bazzi Nov 21 '16 at 20:36