Alternative definition of Dirac function Can someone explain why the formula below is a definition of the Dirac function?
$$\int_I y(0) \delta(t)\, dt =\begin{cases}
y(0) \text{ if 0}\in \text{I} \\\\
0 \text{ otherwise}
\end{cases}$$
where $I$ is an interval.
I am used to the definition $\int \delta(t) \,dt = 1$ and $\delta(t) = \infty$ if $t = 0$, otherwise $0$.
 A: The definition you give ($\int \delta(t) dt = 1$ and $\delta(t) = \infty$ if $t = 0$, otherwise $0$) is more of a characterization its behavior, rather than a true definition. 
Rewrite your expression as:
$$ \int_\mathbb{R} y(0) 1_I \delta(t)\, dt$$
where $1_I$ is the indicator function for I.
This integrand is a representation of $[(y\cdot 1_I) * \delta](0)$ where $*$ is a convolution. Because the dirac delta is the identity with respect to the convolution, this is equal to $[(y\cdot 1_I)](0)$; this is $y(0)$ if $I$ contains 0, or zero otherwise.
A: 
In THIS ANSWER and THIS ONE, I provided primers on the Dirac Delta.


The notation $\int_a^b f(t)\delta(t-c)\,dt$, $a\le b$, is interpreted to mean the functional $\langle fp_{ab},\delta_c\rangle$.  
Here, $p_{ab}$ is the "rectangular pulse" function, $p_{ab}(t)=u(t-a)-u(t-b)$, and $u$ is the unit step (or Heaviside Function) where
$$u(t)=\begin{cases}1&,t>0\\\\0&,t<0\end{cases}$$

Note that there are various conventions for the value $u(0)$.  

Therefore, we have
$$\begin{align}
\int_a^b f(t)\delta(t-c)\,dt&=\langle fp_{ab},\delta_c\rangle\\\\
&=\begin{cases}f(c)&,c\in(a,b)\\\\0&,c\notin [a,b]\end{cases}
\end{align}$$


Note that if $c=a$ or $c=b$, the functional is not defined.

