Understanding an integration I need some help in understanding the integration performed in below equation. My question is how step 2 is obtained from the first step (i.e., how integration of exponential and dirac delta functions is performed). Thanks in advance.
$$\begin{align*}
\mathsf{P}(0<Y\leq 7) &=\int_{0^+}^7\left[\frac{1}{4}e^{-|y|}+\frac{1}{3}\delta(y)+\frac{1}{6}\delta(y-7)\right]dy\\\\\\
&=\frac{1}{4}\int_0^7e^{-y}\,dy+\frac{1}{6}\\\\\\
&=\frac{1-e^{-7}}{4}+\frac{1}{6}=\frac{5}{12}-\frac{e^{-7}}{4}
\end{align*}$$
(original image)
 A: The defining properties of $\delta(y)$ are
$$\delta(0)\to\infty$$
$$\delta(y)=0\quad y\ne0$$
$$\int_{-\infty}^{\infty}\delta(y)dy=1$$
The second one means that $\delta(y)$ vanishes in the neighbourhood of $0$ however small.
It also follows that
$$\int_{-\infty}^{\infty}\delta(y)dy=\int_{-\epsilon}^{\epsilon}\delta(y)dy=1\tag{1}$$
for arbitrarily small $\epsilon>0$ The integral could also be written as
$$I=\int_{\epsilon}^{7}\left[\frac{1}{4}e^{-|y|}+\frac{1}{3}\delta(y)+\frac{1}{6}\delta(y-7)\right]dy$$
From which it is clear that the $\delta(y)$ term vanishes as the interval of integration does not include the singularity. 
Now add a small $\epsilon_1$ neighbourhood of 7 to the interval of integration and consider
$$I_1=\int_{7-\epsilon_1}^{7+\epsilon_1}\left[\frac{1}{4}e^{-|y|}+\frac{1}{6}\delta(y-7)\right]dy$$
By the man value theorem we can write:
$$I_1=\frac{\epsilon_1}{2}e^{-c}+\frac{1}{6}\int_{7-\epsilon_1}^{7+\epsilon_1}\delta(y-7)dy$$
where $c\in [7-\epsilon_1,7+\epsilon_1]$. Now using $(1)$ we can write
$$I_1=\frac{1}{6}\int_{-\infty}^{\infty}\delta(y-7)dy+O\left(\epsilon_1\right)=\frac{1}{6}+O\left(\epsilon_1\right)$$
Since $\epsilon_1$ is arbitrary we obtain the final result.
A: A delta function satisfies $\int_{-\infty}^\infty \delta(x) dx=1$ but also $\int_{-\epsilon}^\epsilon \delta(x) dx=1$ for every $\epsilon>0$. Intuitively, it can be thought of as a function that is zero everywhere, but jumps quickly to infinity at zero. This is the physical/engineering interpretation.
Another way to think about a delta function, is as the derivative of a step function, usually denoted as $u(x)$ satisfies $u(x)=1$ for $x \ge 0$ and $u(x)=0$ for $x<0$
In your problem, the integral starts from $0^+$, so the integral over the first delta is $0$ (it's like integrating a zero). The second delta is a shifted delta to $x=7$, which its integral is $u(x-7)$. Having said that, we get: $\int_{0^+}^7 \frac{1}{6}\delta(x-7)dx=\frac{1}{6}[u(7-7)-u(0^+-7)]=\frac{1}{6}[u(0)-u(-7)]=\frac{1}{6}[1-0]=\frac{1}{6}$
