I saw the lecture notes here. It says that For compact spectral measure $E$, there exists unique normal operator $A$, s.t. $\int \lambda d(E_{\lambda}v|w)$, for abbreviation we write as $A = \int \lambda d E_{\lambda}$. Here $E_{\lambda} = E(\lambda)$.
So can we say that $Av = (\int \lambda dE_{\lambda})v = \int \lambda v dE_{\lambda} = \int \lambda d(E_{\lambda}v)$ ?
Also, if spectrum $\sigma(A)$ is discrete, why $\int_{\sigma(A)} \lambda d(E_{\lambda}v|w)$ over discrete set can be nonzero?
For example ... Start with a complete orthonormal subset $\{ e_{n} \}_{n=1}^{\infty}$ of a complex Hilbert space $\mathcal{H}$. Let $\{\lambda_n \}_{n=1}^{\infty}$ be a bounded sequence of real numbers. You can define a bounded self-adjoint operator $T$ by $$ Tx=\sum_{n=1}^{\infty}\lambda_n \langle x,e_n\rangle e_n $$ Every $\lambda_n$ is an eigenvalue of $T$, with $Te_n=\lambda_n e_n$. The associated spectral measure is $$ E(S)x = \sum_{\{ n : \lambda_n \in S \}}\langle x,e_n\rangle e_n $$ Because $\{ e_n \}$ is a complete orthonormal subset of $\mathcal{H}$, then $E(\mathbb{R})$ is the identity operator $I$. The operator $T$ may be written as $Tx=\int_{\mathbb{R}}\lambda dE(\lambda)x$, which is the typical and somewhat misleading notation used to denote a general integral because $E$ is not a function of a real variable $\lambda$. Using this notation, the integral represents a sum: $$ Tx=\int \lambda dE(\lambda)x = \sum_{n}\lambda_n\langle x,e_n\rangle e_n $$ The completeness of the orthonormal subset $\{ e_n\}$ is expressed by $$ x = \int dE(\lambda)x = \sum_{n}\langle x,e_n\rangle e_n. $$