# When convolving two functions that are constants in a region and 0 everywhere else, where does the integration start?

Heads up, this is for homework. I never took a signals and systems course, so I'm behind on this stuff.

I want to compute the convolution of two rectangular regions. I know the standard equation for convolution, where the integrals are from $-\infty$ to $\infty$, but it is useful to restrict the integration to the areas that matter.

I have one function that has a value of $1/3$ when $-0.5 \le x \le 0.5$ and $0 \le y \le 0.4$.

I have a second function that has a value of $1$ when $-1/50 \le x,y \le 1/50$. Where would the bounds for integration be for convolving functions like this?

You need to understand that the result of a convolution is a function and the alleged convolution integral is actually an infinitude of integrals, one for each time instant. By this I mean that to compute the output $y(t)$ of a system with impulse response $h(t)$ to an input signal at time $t = 5$, we write \begin{align*} y(5) &= \int_{-\infty}^\infty h(\tau)x(5-\tau)\mathrm d\tau,\\ \end{align*} and compute $y(5)$. For $t = 6.5$, we write \begin{align*} y(6.5) &= \int_{-\infty}^\infty h(\tau)x(6.5-\tau)\mathrm d\tau,\\ \end{align*} and compute $y(6)$. For $t = 10.2$, we write \begin{align*} y(10.2) &= \int_{-\infty}^\infty h(\tau)x(10.2-\tau)\mathrm d\tau,\\ \end{align*} and compute $y(10.2)$.and so on. After doing this a while, some smart-ass said, "Hey Ma, I am beginning to see a pattern here! Lookit, I can write \begin{align*} y(t) &= \int_{-\infty}^\infty h(\tau)x(t-\tau)\mathrm d\tau, ~\text{for all} ~t\\ \end{align*} and the world was never the same again.
Suppose that $h(t)$ is $0$ for $t < 0$ or $t > 12$. Then all the integrals exhibited above simplify in the sense that the limits can be changed to $0$ and $12$ since the integrand, being a multiple of $h(\tau)$, is $0$ when $\tau < 0$ or $\tau > 12$. Suppose in addition that $x(t)$ is nonzero only when $|t| < 3$. Now look at the first integral (for $y(5)$ with the limits changed to $0$ and $12$). At $\tau = 0$, the integrand is $h(0)x(5-0) = 0$ since $x(5) = 0$. As $\tau$ increases towards $12$, the argument of $x$ in the integrand decreases from $5$ downwards till the argument hits $-7$ at $\tau = 12$. Thus, the integrand is nonzero only for $\tau \in (2,8)$, having value $h(2)x(5-2) = h(2)x(3)$ at one end of the interval and value $h(8)x(5-8) = h(8)x(-3)$ at the other. We conclude that $$y(5) = \int_{-\infty}^\infty h(\tau)x(5-\tau)\mathrm d\tau = \int_{0}^{12} h(\tau)x(5-\tau)\mathrm d\tau = \int_{2}^{8} h(\tau)x(5-\tau)\mathrm d\tau.$$ Similarly, $$y(6.5) = \int_{-\infty}^\infty h(\tau)x(6.5-\tau)\mathrm d\tau = \int_{0}^{12} h(\tau)x(6.5-\tau)\mathrm d\tau = \int_{3.5}^{9.5} h(\tau)x(6.5-\tau)\mathrm d\tau.$$ However, $$y(10.2) = \int_{-\infty}^\infty h(\tau)x(10.2-\tau)\mathrm d\tau = \int_{0}^{12} h(\tau)x(10.2-\tau)\mathrm d\tau = \int_{7.2}^{12} h(\tau)x(10.2-\tau)\mathrm d\tau$$ (can you see why?)
So, there is not a simple answer to your question about the limits of integration; you have to work them out for each value of $t$ for which you want to evaluate the convolution integral. But you don't have to do an infinite amount of work! There are Look Ma moments here and there. Can you combine two of the results above to write that for each $t$, $3 \leq t \leq 9$, we have the useful pattern $$y(t) = \int_{t-3}^{t+3} h(\tau)x(t-\tau)\mathrm d\tau$$ shown above?
• Thanks. With regard to your question, I don't know where I wrote $\tau \pm 3$ in my answer. In the last integral in my answer, $t$ is just some fixed number between $3$ and $9$, e.g. $5.9$, and the limits are $t-3=2.9$ and $t+3=8.9$. If $t$ were $5$, the limits would be $2$ and $8$ as in my first example. – Dilip Sarwate Feb 11 '12 at 2:24