Let $\mathcal{H}$ be a Hilbert space, $B\in\mathcal{B}(\mathcal{H})$ be bounded and self-adjoint and $A:\mathcal{D}(A)\to\mathcal{H}$ closed (but not necessarily self-adjoint or bounded). The following is well-known and easy to prove:
If $BA\subset AB$ then $f(B)A\subset Af(B)$ and hence $f(B)A=Af(B)$ on $\mathcal{D}(A)$ for every measurable and bounded function $f$ on $\sigma(B)$.
The proof idea is actually quite simple: One first shows that the equation is true on polynomials and then uses Stone-Weierstrass theorem to conclude it for general functions. Actually, the result can be easily extended to unbounded functions, to conclude that $BA\subset AB$ implies
$$f(B)A=Af(B)\qquad on\qquad\mathcal{D}(f(B)A)\cap\mathcal{D}(f(B))\subset\mathcal{D}(Af(B))$$
which follows by approximating $f$ with bounded functions and the fact that $A$ is closed (of course, the considered domain might in principle be empty, but thats not the point of my problem). My question is related to the kind of reversed problem: Given that $B$ is unbounded but $f$ bounded, can I get a similar statement?
Question: Let $A,B$ be two unbounded operators, $B$ self-adjoint and $A$ closed, such that $BA\subset AB$. Is it then true that $f(B)A= Af(B)$ for every bounded function $f$ on some suitable domain $\mathcal{D}\subset\mathcal{D}(A)$?
Does anyone know a result like this? Maybe with some additional assumptions on the function $f$ (like continuous and vanishing at infinity) or on the operators $A,B$ (for example on the spectrum)?