Let $H$ be a Hilbert space over the field $\mathbb{C}$ and $A\in B(H)$ be a bounded self-adjoint operator. Let $V\subset H$ be a closed subspace invariant under $A$ and $f:\sigma(A)\to\mathbb{C}$ be a bounded measurable complex valued function. Take the "functional calculus" for $f$, meaning that $f(A) = \int_{\sigma(A)}f(\lambda)d\mu^A(\lambda)$ for a unique projection valued measure $\mu^A$ which satisfies $\int_{\sigma(A)}\lambda d\mu^A(\lambda) = A$. I am trying to show that $V$ is invariant under $f(A)$, but I don't know how I could (or should) start the proof: I would like to use such a result in which $f(A)$ has a representation containing only powers $A^k,k=0,1,2,\dots$ of $A$, as then surely $v\in V \implies f(A)v\in V$. But I am not aware of any such result. If $f$ were to be continuous, this would be quite straightforward as then $f$ could be approximated by a sequence of polynomials $p_n$ and clearly $V$ is invariant under any $p_n(A) = \sum_{k=0}^{N_n}a_{k,n}A^k,a_{k,n}\in\mathbb{C}$.
What should I do?
If $A(V)\subset V$ then $A(V^\perp)\subset V^\perp.$ Let $A_1$ and $A_2$ denote the restrictions of the operator $A$ to $V$ and $V^\perp,$ respectively. Let $\mu^{A_1}$ and $\mu^{A_2}$ denote the corresponding resolutions of the identity. Then $$\mu^A:=\mu^{A_1}\oplus \mu^{A_2}$$ is the resolution of the identity corresponding to $A,$ where the first summands acts on $V$ while the second on $V^\perp.$ Thus for any bounded Borel function $f$ on $\sigma(A)=\sigma(A_1)\cup \sigma(A_2)$ we have $$ f(A)=f(A_1)\oplus f(A_2)$$ so $V$ is an invariant subspace of $A.$