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?



Composition of spectral measures
The best reference I know on these questions is Fell & Doran, [Representations of ${}^\*$-algebras, locally compact groups, and Banach ${}^\*$-algebraic bundles. Vol. 1](http://www.ams.org/mathscinet-getitem?mr=936628) (1988).


First they show your equality for $f$ and $g$ "$E$-measurable and $E$-essentially bounded" (11.8.III), and then I quote from (11.21):



> 
> *Let $f:X\to\mathbf C$ and $g:X\to\mathbf C$ be $E$-measurable. Then*: (...)
> 
> 
> (III) $\left(\int f\,dE\right)\left(\int g\,dE\right)\subset\int fg\, dE$
> 
> 
> (...) *Equality holds in* (III) *provided that there exist positive numbers $k\_1$, $k\_2$ satisfying*
>  $$
> \left|g(x)\right|\geqslant k\_1\Rightarrow\left|f(x)\right|\geqslant k\_2
> $$
>  *for $E$-almost all $x$ in $X$. In particular, equality holds in* (III) *if $g$ is $E$-essentially bounded.* (...)
> 
> 
> (V) *If $\xi$ belongs to the domains of both $\int g\,dE$ and $\int fg\,dE$, then $(\int g\,dE)(\xi)$ belongs to the domain of $\int f\,dE$, that is, $\xi$ belongs to the domain of the left side of* (III).
> 
> 
> 


