Integral Unit Impulse Function I am having trouble integrating the following unit impulse function.
$$\int_{0}^{4} \delta(t - \tau)  \, d\tau$$    
I got the answer $$u(t-4) - u(t)$$
but my professor says its $$u(t) - u(t-4)$$
Can some one clarify this for me?
Thanks!
 A: Let us define the function
$$
f(\tau)=u(\tau)-u(\tau-4)
=
\begin{cases}
1 & 0<\tau<4\\
0 & \tau<0\text{ or }\tau>4.
\end{cases}
$$
(One way of seeing the second equality is that $u(\tau)$ is zero for $\tau<0$ and one for $t>0$, and $u(\tau-4)$ is zero for $\tau<4$ and one for $\tau>4$. Thus subtracting them, $u(\tau)-u(\tau-4)$ becomes what I wrote above.)
This means that your integral can be written
$$
\int_{-\infty}^{+\infty}\bigl(u(\tau)-u(\tau-4)\bigr)\delta(t-\tau)\,d\tau=(f*\delta)(t)=f(t)=u(t)-u(t-4).
$$
Here we have seen the integral as a convolution, and used the fact that $\delta$ acts as a unit when it comes to convolutions, i.e. $f*\delta=f$.
Edit
If you prefer, the derivative of $u$ is $\delta$, and hence (this is what it has to be)
$$
\int_0^4\delta(t-\tau)\,d\tau=\bigl[-u(t-\tau)\bigr]_{\tau=0}^{4}=-u(t-4)+u(t)=u(t)-u(t-4).
$$
A: In This Answer, I provided a primer on The Dirac Delta.  The Dirac Delta is not a function.  It is a Generalized Function or Distribution.
The "symbol," $\int_{-\infty}^{\infty} f(\tau)\,\delta(t-\tau)\,d\tau$, is not an integral, although it does share certain properties with the integral.  It is, rather, a linear functional that maps a test function $f$ into the number $f(t)$. 
Now, the meaning of the "symbol," $\int_a^b f(\tau)\,\delta(t-\tau)\,d\tau$, is the linear functional that maps the test function $f(u_a-u_b)$ as 
$$\begin{align}
\int_a^b f(\tau)\,\delta(t-\tau)\,d\tau&=\int_{-\infty}^\infty f(\tau)\left(u(\tau-a)-u(\tau-b)\right)\,\delta(t-\tau)\,d\tau\\\\
&=f(t)\left(u(t-a)-u(t-b)\right)
\end{align}$$
where $u$ is the unit step function defined by 
$$u(t)=
\begin{cases}
1&,t>0\\\\
1/2&,t=0\\\\
0&,t<0
\end{cases}
$$
Therefore, for $f(t)=1$, $a=0$, and $b=4$ we have 
$$\bbox[5px,border:2px solid #C0A000]{\int_0^4 \delta(t-\tau)\,d\tau=u(t)-u(t-4)}$$
as expected!
A: Hint:
Your error is that you have used the ''primitive'' of $\delta(t-\tau)$ with respect to $t$, that is $u(t-\tau)$ but the integral is respect to $\tau$ and the ''primitive'' is $-u(t-\tau)$.
