I was browsing David Griffiths' "Introduction to Quantum Mechanics" (which I know is horrible for mathematical rigor) when I found a problem that basically asks you to prove that if two operators $\hat{P}$ and $\hat{Q}$ have a complete set of simultaneous eigenfunctions, then $\left[\hat{P}, \hat{Q}\right]\phi = 0$, $\forall\phi\in L^2\left(\mathbb{R}\right)$. I restricted my attention to closed operators due to their nice behavior with limits, and for these I can answer the problem for two operators with pure point spectra since $$\left[\hat{P},\hat{Q}\right]\phi=\left[\hat{P},\hat{Q}\right]\sum_rc_r\psi_r=\sum_rc_r\left[\hat{P},\hat{Q}\right]\psi_r=0$$ where the $\psi_r$ are simultaneous eigenfunctions of $\hat{P}$ and $\hat{Q}$. However, I am not confident on how to proceed for a pair of operators with continuous spectra because I know pretty much nothing about operator theory. For example, I am not sure if a similar manipulation: $$\left[\hat{P},\hat{Q}\right]\phi=\left[\hat{P},\hat{Q}\right]\int_{-\infty}^{\infty}c(r)\psi_r\;dr\overset{?}{=}\int_{-\infty}^{\infty}\left[\hat{P},\hat{Q}\right]c(r)\psi_r\;dr$$ is valid or even useful in this case, since if $\hat{P}$ happens to be a differential operator with respect to $r$ or something of a similar nature, this particular approach may not hold up. If anyone happens to know a nice proof for this, I would greatly appreciate the help! I also apologize in advance if anything in this question sounds like total nonsense!
EDIT: After reading the spectral theorem on Wikipedia, I am wondering if it is valid to pull unitary operators under an integral. From the statement of the theorem, it seems that for a self-adjoint operator $P$ on a Hilbert space ($L^2(\mathbb{R})$ for my purposes), the following is true for its eigenfunctions $\xi_p$ $$T_PU\xi_p = pU\xi_p$$ where $T_P$ is some multiplication operator and $U$ is some unitary operator, so that a function $\psi(s) = U\phi(x)$ in the domain of $T_P$ can be expanded as $$\psi(s)=\int_\mathbb{R}c_1(p)U\xi_p(x)\;dp$$ $$\psi(s) = U\phi(x) = U\int_\mathbb{R}c_2(p)\xi_p(x)\;dp$$ does $c_1(p) = c_2(p)$ (i.e., can I pull $U$ under the integral)? I apologize if I am horribly misunderstanding something!
Sorry, I see that you meant $U$ is that specific operator, so forget about my example.
The problem with $$T_PU\xi_p = pU\xi_p$$ is that when there is a continuous spectrum (such as for a momentum operator) the eigenfunctions are not normalisable (for a free particle they are $\exp{ipx}$), so rigorously they are not vectors in the domain of $U$.
In the discrete spectrum case a Hermetian operator can be written $$\Sigma E_i P_i$$ where $E_i$ is the eigenvalue and $P_i$ is the projection operator onto the eigenspace. Spectral theory generalises this to continuous spectra by (roughly speaking) considering projections onto states in intervals $[E, E+\epsilon]$. These are well defined on normalisable vectors and allow an integral analogue of $\Sigma E_i P_i$ to be constructed in terms of a "projection valued measure". This also includes discrete eigenvalues as steps in the measure function. "A complete set of simultaneous eigenfunctions" translates to having the same spectral measure, so the integral form of your argument can be made rigorous.