Impulse function and exponential, integral

I'm having trouble understanding this integral:

$$ y =\int\limits_{-\infty}^{\infty}\delta(t+2)e^{-t}dt = e^2$$

I'm having trouble visualizing what this function looks like. Is $\delta(t+2)$ an infinite line along the y-axis, shifted to left by $2$? And why doesn't this integral $ = e^{-2}$?


The object "$\delta(x)$" is not a function, but rather a Generalized Function or Distribution.

In THIS ANSWER and THIS ONE, I provided primers on the Dirac Delta.

We facilitate visualizing the Dirac Delta through a simple regularization. To proceed, let $\delta_n(x)$ be the family of functions defined by

$$ \delta_n(x)= \begin{cases} n/2,&-\frac{1}{n}\le x\le \frac{1}{n}\\\\ 0,&\text{otherwise} \tag1 \end{cases}$$

Note that $\delta_n(x)$, as given by $(1)$, is a "pulse" function that is centered at the origin and has height $n/2$ and width $2/n$. Hence, the area under $\delta_n(x)$ is identically equal to $1$ for all $n$. Moreover, we see that $\delta_n(x)$ has the properties that

$$\lim_{n\to \infty}\delta_n(x)=\begin{cases}0&,x\ne 0\\\\\infty&,x=0\end{cases}$$

and

$$\bbox[5px,border:2px solid #C0A000]{\lim_{n\to \infty}\int_{-\infty}^\infty f(x)\delta_n(x-a)\,dx=f(a)} \tag 2$$

for all suitable test functions $f$. The property in $(2)$ is called the "sifting" property of the Dirac Delta.

Hence, we can formally write the regularization as

$$\bbox[5px,border:2px solid #C0A000]{\delta(x)\sim \lim_{n\to \infty}\delta_n(x)} \tag 3$$

where $(3)$ is interpreted to imply $(2)$.


Applying $(2)$ to the case for which $a=-2$ and $f(x)=e^{-t}$, we find that

$$\begin{align} \int_{-\infty}^\infty e^{-t}\delta(t+2)\,dt&=\lim_{n\to \infty}\int_{-\infty}^\infty e^{-t}\delta_n(t+2)\,dt\\\\ &=\lim_{n\to \infty}\int_{-2-1/n}^{-2+1/n} e^{-t}\left(\frac{2}{n}\right)\,dt\\\\ &=e^{-(-2)}\\\\ &=e^2 \end{align}$$

And we are done!