Let $f: \mathbb{R}\rightarrow \mathbb{C}$ be a measurable function, $H$ some Hilbert space and
$$ f_E := \int_{\mathbb{R}} f dE$$ for some spectral measure $E$.
Now, my question is: When do we have $f_E\circ g_E = (fg)_E$ for two measurable functions $f$ and $g$?
My idea was that $g$ should be bounded.
The domain of $f_E$ is defined as $D(f_E):=\{x \in H: f \in L^2( \mu_x)\}$, where $\mu_x$ is the Borel measure $\mu_x(\Delta):= \langle E(\Delta)x,x\rangle.$
Then we should have $D(f_E \circ g_E)= D(g_E) \cap D((fg)_E).$ Now let's assume that $g$ is bounded, then $D(g_E)= H$ by the finiteness of the measure. Thus, we have equality of domains.
Is this correct or is also $f$ bounded a sufficient condition?- I don't think so, but is there a better way to say when we get equality?