TITLE: Evaluating an integral of unit step function?
QUESTION [11 upvotes]: First we are given: $$\int_0^t H(s)\,ds=\left.\begin{cases} 0 & t<0\\ t & t>0\\ \end{cases}\right\}=tH(t).$$  Now I have attempted to do the following integral: $$\int_t^\infty [H(s-2)-H(s-3)]\,ds.$$  Now if $t<2$ then answer is $1$ because distance from $2$ to $3$ is $1$ with height $1$, or if $t>3$ answer is $0$.  But I am not sure how to give an answer in the form of the original definition of integration of unit step function.  I would guess that it would be $$\int_t^\infty [H(s-2)-H(s-3)] \, ds=(2-t)H(t-2)-(3-t)H(t-3).$$  I assume that $t<2$ and reasoning behind $2-t$ and $3-t$ is that to find area need distance from $t$ to $2$ and $t$ to $3$ then the times the height of each namely $H(t-2)$, $H(t-3)$.

REPLY [6 votes]: It is useful to first show 
$$\begin{eqnarray*}
\int_a^b H(s-c)ds
&=& \int_{a-c}^{b-c}H(u)du
\hspace{5ex}(\textrm{let }u=s-c) \\
&=& \int_{0}^{b-c}H(u)du - \int_{0}^{a-c}H(u)du \\
&=& (b-c)H(b-c) - (a-c)H(a-c).
\end{eqnarray*}$$
Then 
$$\begin{eqnarray*}
\int_t^\infty [H(s-2)-H(s-3)]ds 
&=& \lim_{R\to\infty} \int_t^R [H(s-2)-H(s-3)]ds \\
&=& \lim_{R\to\infty} \{[(R-2)H(R-2) - (t-2)H(t-2)] \\
&& -[(R-3)H(R-3) - (t-3)H(t-3)]\} \\
&=& 1-(t-2)H(t-2)+(t-3)H(t-3).
\end{eqnarray*}$$
Note that 
$$\lim_{R\to\infty} [(R-2)H(R-2) - (R-3)H(R-3)] 
= \lim_{R\to\infty} [(R-2)-(R-3)] = 1.$$