# Convolution with multiple step functions

This is a question from Bertsekas' Data Networks. It is question 2.2 on page 141.

It is asking for the convolution of the following 2 functions.

Function 1: $s(t) = 1$, when $0 \leq t \leq T$. It is $0$ elsewhere.

Function 2: $h(t) = \alpha e^{-a t}$, when $t \geq 0$. It is $0$ elsewhere.

My work:

The output $r(t) = \int_{-\infty}^{\infty} s(\tau) h(t-\tau) d\tau$. Then, we can rewrite $s(t) = 1 \times u(t) \times u(T-t)$, where $u(t)$ is the standard step function. Also, we can rewrite $h(t) = \alpha e^{-a t} u(t)$.

Then, $$r(t) = \int_{-\infty}^{\infty} u(\tau) u(T-\tau) \alpha e^{-a (t-\tau)} u(t-\tau) d\tau$$

I am confused at this point because there are three separate step functions in the integral. The first step function $u(\tau)$ says the lower limit of $\tau$ in the integral must be 0.

The second step function $u(T-\tau)$ says $\tau \leq T$ or else the integral evalutes to zero. In the examples I am looking at this step function is not present, hence I have not seen this complication before.

The third step function $u(t-\tau)$ says the upper limit of $\tau$ in the integral must be $t$. I have seen this before in the examples.

Does the second step function have much influence on the result of the integral? I have two upper bounds, $\tau = T$ and $\tau = t$. I assume $\tau=t$ wins since it is more general.

Note that: $r(t)$ is defined in the following time range: $[0+0, T+\infty]$. That is, $r(t)$ exists for all non-negative times.

So, $r(t) = \int_0^t \alpha e^{-a (t-\tau)} d\tau$

Thanks.

• Part of the confusion is: suppose I remove the $u(T-t)$ term from $s(t)$. According to my logic, the result $r(t)$ doesn't change. This seems strange to me. May 25, 2011 at 21:48
• $s(t)=u(t)-u(t-T)$ is an option as well. May 25, 2011 at 22:01
• @Raskolnikov: Yes, but after distributing, that still leaves the question of who wins in the upper bound: $\tau = T$ or $\tau = t$ or something else. May 25, 2011 at 22:03
• $t$, what else? You know that $t \leq T$, so once $\tau$ exceeds $t$ you get zero. May 25, 2011 at 22:06

Split into the cases $0 < t \leq T$ and $t > T$, to conclude that $$(s*h)(t) = \int_0^{\min \{ t,T\} } {1 \cdot h(t - \tau )d\tau } = \int_0^{\min \{ t,T\} } {\alpha e^{ - \alpha (t - \tau )} d\tau } .$$
EDIT: It follows that $$(s*h)(t) = 1 - e^{-\alpha t}, \;\; 0 < t \leq T,$$ $$(s*h)(t) = e^{ - \alpha (t - T)} - e^{ - \alpha t} ,\;\; t > T.$$ (Since $(s*h)(t) = 0$ for $t \leq 0$, we see that $(s*h)(t)$ is continuous on $\mathbb{R}$.)
Relation to probability theory: With $s$ and $h$ as above, let $X$ be an exponential random variable with density function $h$, and $Y$ an independent uniform$[0,T]$ random variable, so that $Y$ has density function $\tilde s = s/T$. By the law of total probability, conditioning on $Y$, we have $${\rm P}(X + Y \le t) = \int_0^T {{\rm P}(X \le t - \tau )\frac{1}{T}d\tau }.$$ It follows that if $0 < t \leq T$, then $${\rm P}(X + Y \le t) = \int_0^t {{\rm P}(X \le t - \tau )\frac{1}{T}d\tau } = \frac{1}{T}\int_0^t {(1 - e^{ - \alpha (t - \tau )} )d\tau } = \frac{{t - (1 - e^{ - \alpha t} )/\alpha }}{T},$$ while if $t > T$, then $${\rm P}(X + Y \le t) = \int_0^T {{\rm P}(X \le t - \tau )\frac{1}{T}d\tau } = \frac{1}{T}\int_0^T {(1 - e^{ - \alpha (t - \tau )} )d\tau } = \frac{{T - (e^{ - \alpha (t - T)} - e^{ - \alpha t} )/\alpha }}{T}.$$ Hence, the density function of $X+Y$ is given by $$f_{X+Y} (t) = \frac{{1 - e^{ - \alpha t} }}{T} ,\;\; 0 < t \leq T,$$ $$f_{X+Y} (t) = \frac{{e^{ - \alpha (t - T)} - e^{ - \alpha t} }}{T}, \;\; t > T.$$ On the other hand, since $X$ and $Y$ are independent with respective densities $h$ and $\tilde s \,(=s/T)$, $$f_{X+Y} (t) = (h*\tilde s)(t) = (\tilde s * h)(t) = \frac{{(s*h)(t)}}{T},$$ from which it follows that $$(s*h)(t) = 1 - e^{ - \alpha t} ,\;\; 0 < t \leq T,$$ $$(s*h)(t) = e^{ - \alpha (t - T)} - e^{ - \alpha t} ,\;\; t > T$$ (as we have already seen above).
• Hello Shai Covo, Am I correct in stating the following math statement: $\tau \leq T \wedge \tau \leq t \Rightarrow \tau \leq \min(T, t)$ May 26, 2011 at 20:17
• jrand, this is correct, and more generally $a \le \min \{ x_1 , \ldots ,x_n \} \Leftrightarrow a \le x_1 , \ldots ,a \le x_n$ (where "," stands for "and"). By the way, the symbol $\wedge$ is sometimes used instead of "min". May 26, 2011 at 20:35