The $\delta$ function is defined as a distribution, and is thus an element of $\mathcal{D}'(U)$ for some open set $U \in \mathbb{R}^n$. In other words, it is a function in a dual space, and hence we may write $\delta: C_c^\infty(U) \rightarrow \mathbb{R}$ where $C_c^\infty(U) = \mathcal{D}(U)$ is the set of smooth functions over $U$ with compact support.
What has been bothering me is that I often see expressions such as
$$\int \delta(x)e^x dx.$$
But the function $e^x$ does not have compact support over any open set. Likewise, but less common, I also have seen the $\delta$ function applied to functions that are not infinitely differentiable.
How are such uses of the delta function (and distributions in general) justified?
Best Answer
Given any sets $A,B$, and any point $a\in A$, I can always decide that I want to define the function $\delta_a:F=\text{Functions}(A,B)\to B$, $\delta_a(f):= f(a)$. I can call this an evaluation at $a$ mapping, or I can call this the Dirac delta centered at $a$, or I can give it any other name I like. Point is, I can define it because it makes sense. The question is if this is useful?
Well, Dirac deltas are mostly useful in vector spaces, so it would be a good idea to consider the target $B$ to be a vector space. Also, we want to deal with this in analysis, so the most common choice would be $A$ an open set in $\Bbb{R}^n$, and $B=\Bbb{C}$ (but again, if you're going to be fancier, you may want to allow the domain $A$ to be something else, and you may want to allow $B$ to be any Banach space). Also, for the purposes of analysis, I usually don't just want to consider all functions $A=U\to\Bbb{C}$, I probably only want to consider some of them, and I probably want to equip a topology on these function spaces. Some common choices are
The last three are reflecting the idea that, on $\Bbb{R}^n$, $\mathcal{D}\subset \mathcal{S}\subset \mathcal{E}$ (in the sense of there is a natural inclusion, which is continuous in the appropriate sense). So their topological duals satisfy $\mathcal{E}'\subset\mathcal{S}'\subset\mathcal{D}'$.
There are of course a whole bunch of other spaces on which you can consider things (e.g manifolds, vector bundles blablabla). The question though is for what purpose are you using it. Beyond a certain point it becomes pretty irrelevant whether you want to call it a distribution, or a functional or a linear form, or whatever, because people will freely interchange terms. One has to use context to decipher the intended meaning.