# Discrete Convolution of two piecewise sequences having this specific form

Assume I have the following two sequences : $$x[n]=\begin{cases} \alpha&\text{if a\leq n\leq b}\\ \\ \tag{1} 0&\text{if otherwise} \end{cases} \qquad \text{and} \qquad h[n]=\begin{cases} \beta&\text{if c\leq n\leq d}\\ \\ 0&\text{if otherwise} \end{cases}$$ I was wondering in this case if the convolution : $$(x*h)[n]=\sum_{k=-\infty}^{\infty}x[k]h[n-k] \tag{2}$$ has a specific form applicable for these two piecewise sequences.

I have seen on the internet something like : $$(x * h)[n]=\sum_{k=\max (a, n-d)}^{\min (b, n-c)} x[k] h[n-k] . \tag{3}$$ However, I can not confirm if this is true. I hope someone can provide a proper proof and thank you very much.

• This is really straightforward. $k$ just needs to be inside $[a,b]$ and $n-k$ needs to be in $[c,d]$, that's all. Mar 1 at 22:06
• I see, but why does the boundaries of the summation are given as $\max(a,n-d)$ and $\min(b,n-c)$? @MattL. Mar 1 at 22:07
• intersection of sets... Mar 1 at 22:08
• Because $k$ needs to satisfy two sets of inequalities, so you need to make sure it does by using $max()$ and $min()$. Mar 1 at 22:09
• Ah I see, one last question is there a closed form for the output of the convolution in terms of $\alpha$ and $\beta$? @MattL. Mar 1 at 22:10

$$(x * h)[n]=\sum_{k=\max (a, n-d)}^{\min (b, n-c)} x[k] h[n-k] . \tag{1}$$
where $$x[n]$$ and $$h[n]$$ are as in Eq-1, then you will have
$$\sum_{k=\max (a, n-d)}^{\min (b, n-c)} \alpha \beta = \alpha \beta (\min (b, n-c)- \max (a, n-d) + 1). \tag{2}$$
Where you should evaluate the closed form expression Eq.2 for the non-zero range of output given by the range of $$n$$ : $$a+c \leq n \leq b+d$$