I have a few doubts regarding Rudin's opening paragraphs in Chapter 6 of Functional Analysis. The passage (with small edits) reads:
A complex function $f$ is said to be locally integrable if $f$ is measurable and $\int_K |f| < \infty$ for every compact $K \subseteq R$. We let $\mathcal{D} = \mathcal{D}(\mathbb{R})$ be the vector space of all $\phi\in C^\infty(\mathbb{R})$ whose support is compact. Then
- $\int f\phi$ exists for every locally integrable $f$ and for every $\phi\in\mathcal{D}$.
- $\mathcal{D}$ is sufficiently large to assure that $f$ is determined (a.e.) by the integrals $\int \phi f$. (To see this, note that the uniform closure of $\mathcal{D}$ contains every continuous function with compact support.)
- If $f$ happens to be continuously differentiable, then $$\int f'\phi = -\int f\phi' \ \ \ \ (\phi\in\mathcal{D}).$$
- If $f\in C^\infty(\mathbb{R})$, then $$\int f^{(k)}\phi = (-1)^k\int f\phi^{(k)} \ \ \ \ (\phi\in\mathcal{D}).$$ The compactness of the support of $\phi$ was used in these integrations by parts.
Regarding 2: while it is true that the uniform closure of $\mathcal{D}$ contains all continuous functions with compact support, how does that imply $f$ is determined by the $\int \phi f$?
Regarding 3: it seems to me that the actual equation should be
$$\int f'\phi = f\phi -\int f\phi' \ \ \ \ (\phi\in\mathcal{D}).$$
Why does Rudin omit the $f\phi$ term?
Regarding 4: again, it seems to me the actual equation should be $$\int f^{(k)}\phi = \sum_{i=0}^{k-1}(-1)^if^{(i)}\phi^{(k-i-1)} + (-1)^k\int f\phi^{(k)}.$$ Why does Rudin omit the second term?
Lastly: how is compactness of the support of $\phi$ used?