Momentum space calculation of observables In Griffiths Introduction to Quantum Mechanics, it is stated that the expectation value of any observable can be calculated in the momentum space Fourier space) in the following way.

In momentum space, then, the position operator is $i\hbar\partial/\partial p$. More generally,
  $$
\langle Q\left(x,\,p\right)\rangle=\cases{\int\psi^\star\hat{Q}\left(x,\,\frac{\hbar}{i}\frac{\partial}{\partial x}\right)\psi\,{\rm d}x & \text{in position space;} \\ \int\Phi^\star\hat{Q}\left(-\frac{\hbar}{i}\frac{\partial}{\partial p},\,p\right)\Phi\,{\rm d}p & \text{in momentum space.}}\tag{3.58}
$$
  In principle, you can do all the calculations in momentum space just as well (though not always as easily) as in position space.

Can anyone show the proof of this statement?
 A: We can write the state in the position space as
$$\psi(x)=\frac{1}{\sqrt{2\pi}}\int\tilde{\psi}(k)e^{ikx}dk$$
Therefore, for example
$$\int\psi^{\ast}(x)x\psi(x)dx=\int\left[\frac{1}{\sqrt{2\pi}}\int\tilde{\psi}^{\ast}(k_{1})e^{-ik_{1}x}dk_{1}\right]x\left[\frac{1}{\sqrt{2\pi}}\int\tilde{\psi}(k_{2})e^{ik_{2}x}dk_{2}\right]dx=$$
$$=\int\tilde{\psi}^{\ast}(k_{1})\tilde{\psi}(k_{2})\left[\frac{1}{2\pi}\int xe^{i(k_{2}-k_{1})x}dx\right]dk_{1}dk_{2}=$$
$$=\int\tilde{\psi}^{\ast}(k_{1})\tilde{\psi}(k_{2})\frac{1}{i}\frac{\partial}{\partial k_{2}}\left[\frac{1}{2\pi}\int e^{i(k_{2}-k_{1})x}dx\right]dk_{1}dk_{2}=$$
$$=\int\tilde{\psi}^{\ast}(k_{1})\tilde{\psi}(k_{2})\frac{1}{i}\frac{\partial}{\partial k_{2}}\delta(k_{2}-k_{1}) dk_{1}dk_{2}=\left[{\rm integration\:by\:parts}\right]=$$
$$=\int\delta(k_{2}-k_{1})\tilde{\psi}^{\ast}(k_{1})\left(-\frac{1}{i}\frac{\partial}{\partial k_{2}}\right)\tilde{\psi}(k_{2})dk_{1}dk_{2}=$$
$$=\int\tilde{\psi}^{\ast}(k)\left(-\frac{1}{i}\frac{\partial}{\partial k}\right)\tilde{\psi}(k)dk=\int\tilde{\psi}^{\ast}(p)\left(-\frac{\hbar}{i}\frac{\partial}{\partial p}\right)\tilde{\psi}(p)dp$$
Can you generalize this result?
A: To calculate an expectation value like $$ \langle\psi| \hat Q |\psi\rangle$$ you would like to represent the states and the operator in a given basis, say $\{|x\rangle\}$, by inserting two unities (build out of the basis elements) $$ \langle\psi| \mathbb{1}\hat Q  \mathbb{1}|\psi\rangle.$$ Since the Fourier transformation is akin to regular linear algebra change of basis operations, the representation in momentum space is equivalent.
A: The wave functions in position and momentum are related via Fourier transform
$$\Psi(x)=\frac{1}{(2\pi\hbar)^{n/2}}\int_{\mathbb{R}^{n}}\tilde{\Psi}(p)\exp{\Big(\frac{ipx}{\hbar}\Big)}d^{(n)}p$$
The expectation value of the observable in position space is
$$\bar{O}=\int_{\mathbb{R}^{n}}\Psi^{\dagger}(x)O(x, -i\hbar\partial_{x})\Psi(x)d^{(n)}x=$$
$$=\frac{1}{(2\pi\hbar)^{n}}\int_{\mathbb{R}^{n}}\int_{\mathbb{R}^{n}}\int_{\mathbb{R}^{n}}\exp{\Big(\frac{-ipx}{\hbar}\Big)}\tilde{\Psi}^{\dagger}(p)O(x, -i\hbar\partial_{x})\tilde{\Psi}(q)\exp{\Big(\frac{iqx}{\hbar}\Big)}d^{(n)}pd^{(n)}qd^{(n)}x=$$
$$=\frac{1}{(2\pi\hbar)^{n}}\int_{\mathbb{R}^{n}}\int_{\mathbb{R}^{n}}\int_{\mathbb{R}^{n}}\tilde{\Psi}^{\dagger}(p)O(i\hbar\partial_{q}, q)\tilde{\Psi}(q)\exp{\Big(\frac{i(q-p)x}{\hbar}\Big)}d^{(n)}pd^{(n)}qd^{(n)}x=$$
$$=\int_{\mathbb{R}^{n}}\int_{\mathbb{R}^{n}}\tilde{\Psi}^{\dagger}(p)O(i\hbar\partial_{q}, q)\tilde{\Psi}(q)\delta(p-q)d^{(n)}pd^{(n)}q=$$
$$=\int_{\mathbb{R}^{n}}\tilde{\Psi}^{\dagger}(p)O(i\hbar\partial_{p}, p)\tilde{\Psi}(p)d^{(n)}p$$
