# Calculating sum of a discrete signal

I have to find a convolution of two signals

$h[n] = 0.5^nu[n]$

$x[n] = u[n]-u[n-3]$

the final sum, which is correct is:

$$\sum_{m=n-2}^n 0.5^mu[m]$$

note that i replaced n-k with m, that is $m = n-k$

So, in regards to parameter n, i have to decypher the formula. The result is:

$$0, n<0$$ $$2(1-0.5^n*0.5), 0\le n \lt 2$$ $$1.75*0.5^n/0.5^2, n \ge 2$$

But, i don't know how to get those results. Can you please explain.

The results are correct (maybe i just typed something wrong, if that's the case i'm sorry in advance)

• Nicholas, if Matt's answered helped, please give it the check mark! :-) – Peter K. Dec 3 '15 at 17:49

One way to see it is to realize that $x[n]$ can be rewritten as the sum of 3 impulses:

$$x[n]=\delta[n]+\delta[n-1]+\delta[n-2]$$

Since $h[n]*\delta[n-k]=h[n-k]$ for arbitrary integer $k$ you get

$$h[n]*x[n]=h[n]+h[n-1]+h[n-2]=0.5^nu[n]+0.5^{n-1}u[n-1]+0.5^{n-2}u[n-2]$$

Evaluating this expression yields

$$\begin{array}{lr}0&\quad n<0\\ 0.5^0=1&\quad n=0\\ 0.5^1+0.5^0=1.5&\quad n=1\\ 0.5^n+0.5^{n-1}+0.5^{n-2}= &\\ =0.5^{n-2}(0.5^2+0.5+1)=&\\ =1.75\cdot0.5^{n-2}&n\ge 2 \end{array}$$

which is equivalent to the result you've given.