Closure of sum and multiplication (functional calculus for unbounded linear operators) Let $A$ be a self-adjoint (unbounded) linear operator in a Hilbert space $H$. Let $E$ be the unique regular resolution of the identity on the Borel subsets of $\mathbb{R}$ such that
$$A= \int_\mathbb{R} t dE(t).$$
We then write
$$f(A)= \int_\mathbb{R} f dE$$ for a measurable function $f: \mathbb{R}\to \mathbb{C}$
and we have
$$f(A)+ g(A)\subseteq (f+g)(A), \quad f(A)g(A)\subseteq (fg)(A).$$
Note that the right hand sides $(f+g)(A)$ and $(fg)(A)$ are closed operators, so this begs the questions:
Is $(f+g)(A)$ the closure of $f(A)+g(A)$? Similarly, is $(fg)(A)$ the closure of $f(A)g(A)$? How to prove this?
I learnt this stuff from chapter 13 in Rudin's functional analysis book, so an answer that uses tools from this chapter is highly appreciated! Of course, any input is welcome.
 A: Yes, this is true. In each case, the argument works by localizing the functions to sets where they are bounded. I will only prove it for sums here.
Let $M_n=\{\lambda\in\mathbb R: \lvert f(\lambda)\rvert+\lvert g(\lambda)\rvert\leq n\}$. Clearly, $E(M_n)H\subset D(f(A))\cap D(f(B))$. For $\xi\in D((f+g)(A))$ let $\xi_n=E(M_n)\xi$. As $M_n\nearrow \mathbb R$, we have $\xi_n\to \xi$ in $H$. Moreover,
$$
\lVert (f+g)(A)(\xi-\xi_n)\rVert^2=\lVert (f+g)(A)E(M_n^c)\xi\rVert^2=\int_{\mathbb R}1_{M_n^c}\lvert f(\lambda)+g(\lambda)\rvert^2\,d\langle\xi,E(\lambda)\xi\rangle.
$$
This last integral converges to zero by the dominated convergence theorem. Thus $\xi_n\to \xi$ with respect to the graph norm.
A: In fact, something more general is true. I will treat here the multiplication case, using the same idea as @MaoWao.
Claim: Let $E: \mathcal{F}\to B(H)$ be a resolution of the identity where $(\Omega, \mathcal{F})$ is a measurable space. Let $f,g: \Omega \to \mathbb{C}$ be measurable functions. Then
$$\overline{\left(\int fdE\right)\left(\int g dE\right)}= \int (fg)dE.$$
Proof: Let $A = \int f dE$ and $B = \int g dE$. Let
$$M_n = \{\omega \in \Omega: |f(\omega)|+|g(\omega)| < n\}.$$
Then $M_n \nearrow \Omega$ so $E(M_n)\nearrow 1_H$ in the strong topology. Note that
$$E(M_n)H \subseteq D(AB) = \{\xi \in D(B): B\xi \in D(A)\}.$$
Indeed, let $\xi \in H$. Then
$$\int_\Omega |g(\omega)|^2dE_{E(M_n)\xi, E(M_n)\xi}(\omega) = \int_{M_n} |g(\omega)|^2 d E_{\xi, \xi}(\omega) \le n^2 \|\xi\|^2  < \infty$$
so $E(M_n)\xi \in D(B)$. On the other hand, using the fact that $B$ and $E(M_n)$ commute, we get
$$\int_\Omega |f(\omega)|^2 dE_{BE(M_n)\xi, BE(M_n)\xi}(\omega)= \int_{M_n} |f(\omega)|^2 dE_{BE(M_n)\xi, BE(M_n)\xi}(\omega) \le n^2 \|BE(M_n)\xi\|^2 < \infty$$
so that $BE(M_n)\xi \in D(A)$. Thus, indeed $E(M_n)H\subseteq D(AB)$.
Next, write $C= \int fg dE$. Let $\xi \in D(C)$. Then
$$\|C(\xi- E(M_n)\xi)\|^2 = \|C E(M_n^c)\xi\|^2 = \int_{M_n^c}|(fg)(\omega)|^2 dE_{\xi, \xi}(\omega)\to 0$$
by the dominated convergence theorem (by assumption, $\int_\Omega |f(\omega)g(\omega)|^2 < \infty$, which acts as the dominating function).
It follows that
$$(E(M_n)\xi, (AB)E(M_n)\xi) = (E(M_n)\xi, CE(M_n)\xi) \to (\xi, C\xi)$$
in $H \oplus H$. Consequently, elements in the graph of $C$ can be norm-approximated by elements in the graph of $AB$. It follows that the closure of the graph of $AB$ is the graph of $C$, which means exactly that $C$ is the closure of $AB$, as desired.
