Dirac delta distribution and sin(x) - what can be a test function? I read about the Dirac delta distribution some days ago to better understand distributions (or generalized functions), but I've become a bit confused. I used $\delta$ as a "function" ($\delta(x)$) until now, without thinking about its strict definition. I usually used the following formula:
\begin{equation}
\int_{-\infty}^\infty \delta(x) f(x) dx = f(0),
\end{equation}
but never thought about the properties of the $f(x)$ functions.
Now as I understand, distributions are linear, continous functionals from some vector space of test functions $\mathcal{D}$, where the functions in $\mathcal{D}$ are smooth and have compact support. Also, I've read that the test function space can be extended to the Swartz-functions (~ rapidly decreasing functions (faster than polynomial)).
But - if I'm correct -, none of these space include e.g. sin(x), cos(x), or any polynomial, etc., but it looks for me, that people use integrals with Dirac-$\delta$ in the same way (Understanding Dirac delta integrals?). So, my question is that, is there any other extension of the test function space to include these ones? And also, how can we deal with complex test functions? These are probably interesting from the Fourier transformation point of view.
(P.s.: I'm not a mathematician, so please give me "relativily" simple answers, or give me some reference book / text, where I can read about these.)
 A: Basically, there are the following inclusions
$(\star)$ $\mathcal{D}(\mathbb{R}^n) \subset \mathcal{S}(\mathbb{R}^n) \subset \mathcal{E}(\mathbb{R}^n)$ and $\mathcal{E}'(\mathbb{R}^n) \subset \mathcal{S}'(\mathbb{R}^n) \subset \mathcal{D}'(\mathbb{R}^n)$.
Also $L^p(\mathbb{R}^n) \subset \mathcal{S}'(\mathbb{R}^n)$. Almost all of these inclusions are also continuing, i.e. $\mathcal{D}_K(\mathbb{R}^n) \hookrightarrow \mathcal{S}(\mathbb{R}^n)$, or also $L^p(\mathbb{R}^n) \hookrightarrow  \mathcal{S}'(\mathbb{R}^n)$, this means that the inclusion operator $\iota : L^p(\mathbb{R}^n) \longrightarrow  \mathcal{S}'(\mathbb{R}^n)$ is continuous with respect to topology defined in those spaces, which basically may be a topology induced by a separable seminorms family or by norm. Where
(a) $\mathcal{D}(\mathbb{R}^n)$ is the space test functions
(b) $\mathcal{S}(\mathbb{R}^n)$ is the Schartz space
(c) $\mathcal{E}(\mathbb{R}^n)$ is the space of the regular functions
(d) $\mathcal{E}'(\mathbb{R}^n)$ is the space of the distribution with compact support
(e) $\mathcal{S}'(\mathbb{R}^n)$ is the space of the tempered distributions
(f) $\mathcal{D}'(\mathbb{R}^n)$ is the space of the distributions
For example, we have the inclusions $\mathcal{E}'(\mathbb{R}^n) \subset \mathcal{S}'(\mathbb{R}^n) \subset \mathcal{D}'(\mathbb{R}^n)$ because the inclusions $\mathcal{D}(\mathbb{R}^n) \hookrightarrow \mathcal{S}(\mathbb{R}^n) \hookrightarrow \mathcal{E}(\mathbb{R}^n)$ are continuous and dense  with respect to topology of these spaces and then, for example, the application $v \in \mathcal{E}'(\mathbb{R}^n) \longrightarrow v=u_{\mathcal{D}(\mathbb{R}^n)} \in \mathcal{D}'(\mathbb{R}^n)$ is linear and one-to-one. Therefore each distribution determines a continuous linear functional $v : \mathcal{E}(\mathbb{R}^n) \longrightarrow \mathbb{C}$ (with respect to convergence in $\mathcal{E}(\mathbb{R}^n))$ which it is a compact support distribution, likewise $v : \mathcal{S}(\mathbb{R}^n) \longrightarrow \mathbb{C}$ is a temperate distribution.
Look, here are a lot of theorems to prove, I'm doing you a summary, and basically $\mathcal{S}'(\mathbb{R}^n)$, that is the space of tempered distributions, it's a good space to define the Fourier transform for duality, because essentially the Fourier transform of Schwartz functions satisfies the very useful properties.
Most of these I have studied in several books, there is not just one. "Real Analysis: Modern Techniques and Their Applications" by Folland and "Linear Functinoal Analysis" by "J. Cerda" cover a large part of these topics.
A: I am extending @JohnMartin's nice answer which shows that the evaluation
$$
\langle f, \delta\rangle =f(0)
$$
is well-defined for smooth functions $f$. Note that $\delta$ is not only a compactly supported distribution but a compactly supported Radon measure. Given a Radon measure $\mu$ and a continuous function $f$ with compact support, we can define the evaluation
$$
\langle f, \mu\rangle := \int f(x) \;\mathrm{d}\mu(x)
$$
which defines a duality between the space of compactly supported continuous functions and the space of Radon measures. If $\mu$ is compactly supported the above definition makes sense for all continuous functions (this can be shown using suitable continuous cutoff-functions) and it defines a duality between the space of continuous functions $\mathcal{C}(\mathbb{R}^{n})$ and the space of compactly supported Radon measures.
Since the space $\mathcal{D}(\mathbb{R}^{n})$ is a dense subspace of $\mathcal{C}(\mathbb{R}^{n})$, the space of compactly supported Radon measures is a subspace of the space of distributions $\mathcal{D}'(\mathbb{R}^{n})$ (analogously it is a subspace of $\mathcal{E}'(\mathbb{R}^{n}))$. 
In conclusion the above shows that the $\delta$ distribution can be applied to all continuous functions $f$.
Two side notes: The above arguments also work if $\mathbb{R}^{n}$ is replaced by an open set $\Omega$.
Although it is widely used, I do not like the notation
$$
\int f(x)\delta(x)\;\mathrm{d}x
$$
since the support of $f(x)\delta(x)$ consists of a single point only and hence the function coincides with the zero function almost everywhere and therefore such an integral should be zero.
A detailed discussion of various spaces of distributions can be found in the book "Topological Vector Spaces and Distributions" by John Horváth. The definition of the evaluation of $\delta$ and its derivatives forms the motivation contained in the first chapter of Laurent Schwartz' (who introduced distributions originally) book "Théorie des distributions". Note that the latter is aimed at research mathematicians and might be difficult to read--the motivation is nice to read nevertheless.
