[proofplan]
The proof is a direct unpacking of the spectral theorem and the functional calculus for [self-adjoint operators](/page/Self-Adjoint%20Operators). The spectral theorem identifies $A$ with multiplication by the identity function $\lambda \mapsto \lambda$ against its projection-valued measure, which gives the first moment formula. The norm identity in the functional calculus gives the second moment formula. Finally, expanding the centered square and using $\mu_u^A(\mathbb{R}) = 1$ identifies the spectral second central moment with the Hilbert-space variance.
[/proofplan]
[step:Define the spectral measure associated to the normalized vector]
Let $E_A: \mathcal{B}(\mathbb{R}) \to \mathcal{L}(H)$ denote the projection-valued spectral measure of $A$. Let $\mu_u^A: \mathcal{B}(\mathbb{R}) \to [0,1]$ be the scalar spectral measure defined by
\begin{align*}
\mu_u^A(B) := (E_A(B)u,u)_H
\end{align*}
for every $B \in \mathcal{B}(\mathbb{R})$. Since $E_A(\mathbb{R}) = I$ and $\|u\|_H = 1$, this is a probability measure:
\begin{align*}
\mu_u^A(\mathbb{R}) = (E_A(\mathbb{R})u,u)_H = (u,u)_H = 1.
\end{align*}
[/step]
[step:Recover the expectation from the spectral integral]
Define the identity function $m: \mathbb{R} \to \mathbb{R}$ by
\begin{align*}
m(\lambda) := \lambda \quad \text{for every } \lambda \in \mathbb{R}.
\end{align*}
For each $v \in H$, let $\mu_v^A: \mathcal{B}(\mathbb{R}) \to [0,\infty)$ denote the finite scalar spectral measure defined by
\begin{align*}
\mu_v^A(B) := (E_A(B)v,v)_H \quad \text{for every } B \in \mathcal{B}(\mathbb{R}).
\end{align*}
By the [spectral theorem for self-adjoint operators](/theorems/6911) and its [Borel functional calculus](/theorems/2696) formulation, applied to the self-adjoint operator $A$ with spectral measure $E_A$, the operator $A$ is the spectral integral of $m$, with domain
\begin{align*}
\mathcal{D}(A) = \left\{v \in H : \int_{\mathbb{R}} \lambda^2 \, d\mu_v^A(\lambda) < \infty \right\}.
\end{align*}
Since $u \in \mathcal{D}(A)$, the weak spectral integral identity gives
\begin{align*}
(Au,u)_H = \int_{\mathbb{R}} \lambda \, d\mu_u^A(\lambda).
\end{align*}
[guided]
The first identity is the weak form of the statement that $A$ is obtained by integrating the identity function against its spectral measure. We define $m: \mathbb{R} \to \mathbb{R}$ by
\begin{align*}
m(\lambda) := \lambda \quad \text{for every } \lambda \in \mathbb{R}.
\end{align*}
For each $v \in H$, let $\mu_v^A: \mathcal{B}(\mathbb{R}) \to [0,\infty)$ be the finite scalar spectral measure defined by
\begin{align*}
\mu_v^A(B) := (E_A(B)v,v)_H \quad \text{for every } B \in \mathcal{B}(\mathbb{R}).
\end{align*}
The spectral theorem for self-adjoint operators, in the Borel functional calculus formulation, says that $A = m(A)$ and that a vector $v \in H$ belongs to $\mathcal{D}(A)$ exactly when the second scalar spectral moment is finite:
\begin{align*}
v \in \mathcal{D}(A) \iff \int_{\mathbb{R}} \lambda^2 \, d\mu_v^A(\lambda) < \infty.
\end{align*}
We may apply this theorem because $A$ is self-adjoint by hypothesis and $E_A$ is its projection-valued spectral measure. Since $u \in \mathcal{D}(A)$, the spectral integral defining $Au$ is valid. Pairing the spectral integral for $Au$ with $u$ gives
\begin{align*}
(Au,u)_H = \int_{\mathbb{R}} \lambda \, d\mu_u^A(\lambda).
\end{align*}
This is the expectation of the measurement distribution $\mu_u^A$ because $\mu_u^A$ is the scalar measure obtained from $E_A$ in the state $u$.
[/guided]
[/step]
[step:Recover the second moment from the functional calculus norm identity]
The same functional calculus gives the norm identity for $m(A)u = Au$:
\begin{align*}
\|Au\|_H^2 = \|m(A)u\|_H^2 = \int_{\mathbb{R}} |m(\lambda)|^2 \, d\mu_u^A(\lambda).
\end{align*}
Since $m(\lambda) = \lambda$ is real-valued, $|m(\lambda)|^2 = \lambda^2$. Hence
\begin{align*}
\|Au\|_H^2 = \int_{\mathbb{R}} \lambda^2 \, d\mu_u^A(\lambda).
\end{align*}
[/step]
[step:Identify the Hilbert-space variance with the centered spectral second moment]
Define the scalar
\begin{align*}
a := (Au,u)_H.
\end{align*}
Since $A$ is self-adjoint, $a \in \mathbb{R}$. Define the centered function $c: \mathbb{R} \to \mathbb{R}$ by
\begin{align*}
c(\lambda) := \lambda - a \quad \text{for every } \lambda \in \mathbb{R}.
\end{align*}
By the functional calculus, $c(A) = A - aI$ on $\mathcal{D}(A)$, so the norm identity gives
\begin{align*}
\|(A-aI)u\|_H^2 = \int_{\mathbb{R}} |\lambda-a|^2 \, d\mu_u^A(\lambda).
\end{align*}
Because $a$ and $\lambda$ are real, $|\lambda-a|^2 = (\lambda-a)^2$. Therefore
\begin{align*}
\operatorname{Var}_u(A) = \|(A-(Au,u)_H I)u\|_H^2 = \int_{\mathbb{R}}(\lambda-(Au,u)_H)^2 \, d\mu_u^A(\lambda).
\end{align*}
[/step]