I'm trying to apply the spectral theorem to the explicit example of the momentum operator:
\begin{equation} p:= i\frac{d}{dx} \end{equation}
on the domain $D=\{\psi\in H^1(0,2\pi)\ |\ \psi(0)=\psi(2\pi)\}$. Then p is self-adjoint, and its spectrum is given by the integers.
Now, given a $\psi$ in the domain, it holds by the spectral theorem
\begin{equation} <\psi\ |\ p[\psi]> = \int_{\mathbb Z}^{}n\ d\mu_\psi(n) \end{equation}
In order to explicitly obtain $\mu_{\psi}$, one should apply Stieltjes' inversion formula to the function
\begin{equation} \mathcal{F}_\psi:\ z \longmapsto <\psi,\ (p-z)^{-1}[\psi]>, \ z\in\mathbb C \end{equation}
Namely, the task is to compute the following resolution of identity:
\begin{equation} \mu_\psi(\lambda) = \lim_{\delta\to 0^+} \lim_{\varepsilon\to 0^+} \frac{1}{\pi} \int_{-\infty}^{\lambda + \delta}Im[\mathcal{F}_\psi (t+i\varepsilon)]dt \end{equation}
The most natural thing to do would seem to be using Fourier Series. This has however proved unuseful. One gets:
\begin{equation} \mathcal{F}_\psi(z) = \int_0^{2\pi}\sum_{k\in\mathbb Z}\frac{|c_k|^2}{k+z}\exp{[ikx]}dx \end{equation}
where $\psi(x) = \sum_{k\in \mathbb Z}c_k\exp{[ikx]}$. I'm not getting anywhere with this: the series keeps hanging around, and there are integrals over the whole half-line of sines and cosines.
Any hint would be greatly appreciated!
Edit 1: I tried digging deeper into the rabbit hole: switching series and integral in the last equation kills every k-term but $k=0$. The computation of $\mu_\psi(\lambda)$ is then doable, at the least with the help of Mathematica.\newline Unfortunately, the computation yields
\begin{equation} \mu_\psi(\lambda) = \frac{\lambda + |{\lambda}|}{2\lambda}||{\psi}||^2 \end{equation}
i.e. a delta measure centered at zero. This would mean
\begin{equation} <\psi\ |\ p[\psi]> = \int_{\mathbb Z}^{}n\ d\delta_0(n) = 0 \end{equation}
so that the problem is still not solved.
By the way, I also realized that Fourier Series are really the answer to my question. "Reverse engineering" is then maybe possible.
Edit 2: I put some more thought into the problem, and I think I solved it. I'd still like to receive a confirm.
Apparently, the equation
\begin{equation} \mathcal{F}_\psi(z) = \int_0^{2\pi}\sum_{k\in\mathbb Z}\frac{|c_k|^2}{k+z}\exp{[ikx]}dx \end{equation}
is wrong. The right computation implies a Kronecker Delta and yields just
\begin{equation} \mathcal{F}_\psi(z) = \sum_{k\in\mathbb Z}\frac{|c_k|^2}{k+z} \end{equation}
Now everything gets easier. One can compute $\mu_\psi(\lambda)$ explicitly, and the result is
\begin{equation} \mu_\psi(\lambda) = \sum_{k\in\mathbb Z}|c_k|^2\frac{k+\lambda + |{k+\lambda}|}{2(k+\lambda)} = \sum_{k\in\mathbb Z}|c_k|^2\chi_{[-\lambda, +\infty)} \end{equation}
The resulting measure is some kind of counting measure, characterized by
\begin{equation} \mu_\psi(\{n\}) = \mu_\psi(n)-\mu_\psi(n-1) = |c_n|^2,\ \forall n\in\mathbb Z \end{equation}
So that
\begin{equation} <\psi\ |\ p[\psi]> = \int_{\mathbb Z}^{}n\ d\mu_\psi(n) = \sum_{n\in\mathbb Z}n|c_n|^2 \end{equation}
Which is exactly the result one gets applying the Fourier Series theory. From here it's also possible to see
\begin{equation} p[\cdot] = \sum_{n\in\mathbb Z}n\Big[\int_0^{2\pi}\cdot(x)e^{-inx}dx\Big]e^{inx} \end{equation}
which also agrees with the FS theory.
I hope this is at least useful for the internet wanderers...
The resolvent operator is $$ (L-\lambda I)^{-1}f = \sum_{k=-\infty}^{\infty}\frac{1}{n-\lambda}(f,e^{inx})e^{inx}. $$ where $(f,g)=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)\overline{g(t)}dt$ is the normalized inner product on $L^{2}[-\pi,\pi]$. If $[a,b]\subset\mathbb{R}$ has endpoints that are not integers, then the spectral measure $E$ is evaluated using residues to be \begin{align} E[a,b]f&=\lim_{\epsilon\downarrow 0}\frac{1}{2\pi i}\int_{a}^{b} \{(L-(t+i\epsilon)I)^{-1}f-(L-(t-i\epsilon)I)^{-1}f\}dt \\ &=\sum_{n \in (a,b)} (f,e^{inx})e^{inx}. \end{align}