Dirac delta function integral How should i integrate this?
$$\int_{0}^{t} \int_{0}^{t} \delta(x-y)dxdy$$ where $\delta$ represents Dirac delta function
My try:
$\int_{0}^{t} \int_{0}^{t} \delta(x-y)dxdy = t$ is it right?
 A: As you mention in a comment,
$$ \int_\mathbb{R} f(t) \delta(t-a) dt = f(a).$$
So here,
$$ \int_0^t 1 \cdot \delta(x-y) dx = 1$$
as long as the point when $x = y$ occurs within the domain of integration [which it does]. Your integral then becomes
$$ \int_0^t 1 \;dy = t.$$
A: *

*OP's integral is:
$$ I~:=~\int_0^t \! dy  ~\int_0^t \! dx ~ \delta(x-y). $$  

*Hint: Divide into cases where $t$ is positive and negative. Let $1_{[a,b]}(x)$ denote the indicator/characteristic function for the interval [a,b].

*Case $t\geq 0$: 
$$ I~=~\int_{\mathbb{R}} \! dy~ 1_{[0,|t|]}(y) ~\int_{\mathbb{R}} \! dx ~1_{[0,|t|]}(x)~\delta(x-y)$$
$$~=~\int_{\mathbb{R}} \! dy  ~ 1_{[0,|t|]}(y)~1_{[0,|t|]}(y)
~=~\int_{\mathbb{R}} \! dy  ~ 1_{[0,|t|]}(y)~=~|t|.$$

*Case $t\leq 0$: 
$$ I~=~\int_{\mathbb{R}} \! dy~ 1_{[-|t|,0]}(y) ~\int_{\mathbb{R}} \! dx ~1_{[-|t|,0]}(x)~\delta(x-y)$$
$$~=~\int_{\mathbb{R}} \! dy  ~ 1_{[-|t|,0]}(y)~1_{[-|t|,0]}(y)
~=~\int_{\mathbb{R}} \! dy  ~ 1_{[-|t|,0]}(y)~=~|t|.$$
A: The posts above were almost correct, but the answers fell short when the delta function was defined incorrectly.
Definition of delta function
$$f(y) = \int_{-\infty }^{\infty } f(x)\delta (x-y)\; $$
Which can be simplified as
$$1 = \int_{-\infty }^{\infty }\delta (x-y)\; dx$$
Because the delta function is even $\delta(x) = \delta(-x)$, the definition can be extended to
$$1 = 2\int_{0}^{\infty }\delta (x-y)\; dx\; \; \; \; \Rightarrow \; \; \; \; \frac{1}{2} = \int_{0}^{\infty }\delta (x-y)\; dx$$
Assuming that $0<t<\infty $
$$\frac{1}{2} = \int_{0}^{t}\delta (x-y)\; dx + \int_{t}^{\infty }\delta (x-y)\; dx\; \; \; \; \Rightarrow \; \; \; \; \frac{1}{2} = \int_{0}^{t}\delta (x-y)\; dx $$
$$\because \int_{t}^{\infty }\delta (x-y)\; dx = 0$$
Therefore the integral in question simplifies to
$$\int_0^t \int_0^t \delta (x-y) \; dxdy  = \int_0^t \frac{1}{2} \; dy = \frac{1}{2}y \; |_0^t = \frac{1}{2}t$$
A: There is no consensus as to the answer to the question posed herein. As a result, I am adding my own answer. My answer is different than the prior three posted answers.

Let $H$ be the Heaviside step distribution. I find that 
  $$ 
\int_{0}^{t} \int_{0}^{t} \delta(x-y)dxdy
= t\,H(t)
$$

Part 1.
\begin{align*}
\int_0^t \delta{(x-y)}\,dx 
&= 
\begin{cases}
0, 
&
~\textrm{if}~t <  y
\\
1
&
~\textrm{if}~t >y
\end{cases}
\\
&= H(t-y). 
\end{align*}
As a consequence, I find
$$\int_{0}^{t} \int_{0}^{t} \delta(x-y)dxdy = \int_{0}^{t} H(t-y)dy$$ 
Part 2.
Since $1 - H(y-t) = H(t-y)$, I find that
\begin{align}
\int_{0}^{t} H(t-y)dy = t - \int_{0}^{t}   H(y-t) dy. 
\end{align}
I do a change of variables. Let $z = y-t$.
So I write $dz = dy$. Note that when $y = 0$, then $z=-t$; and when $y = t$, then $z=0$. As a consequence, 
\begin{align}
\int_0^t H(t-y) dy 
&
=
t - \int_{-t}^0 H(z) dz 
\\
&
=
t - \left[   \int_{\infty}^0H(z) dz - \int_{\infty}^{-t}H(z) dz\right]
\end{align}
From [1], I know that
$$\int_\infty^a H(\varepsilon)\,d\varepsilon = \max(\left\{0,a\right\}).$$
As a consequence
\begin{align}
\int_0^t H(t-y) dy 
&
=
t - \int_{-t}^0 H(z) dz 
\\
&
=
t - \left[   \max(\left\{0,0\right\}) - \max(\left\{0,-t\right\})\right]
\\
&
=
t + \max(\left\{0,-t\right\})
\\
&=
\begin{cases}
t, 
&
~\textrm{for}~ -t<0, ~\textrm{and}
\\
0,
&
~\textrm{for}~ -t>0.
\end{cases}
\\
&=
\begin{cases}
t, 
&
~\textrm{for}~  t>0, ~\textrm{and}
\\
0,
&
~\textrm{for}~ t<0
\end{cases}
\\
&=
t\,H(t).
\end{align}
