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$.


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.

