Show that the scalar (or inner) product of basis state \(p\) and quantum state \(\phi\) with the position operator \(x\) can be written as a derivative

Method

 * 1) Put the product \(\langle p|\hat{x}|\phi\rangle\) into integral form as described here: \(\langle p|\hat{x}|\phi\rangle = \int \int dq\,dy \langle p|y\rangle\langle y|\hat{x}|q\rangle\langle q|\phi\rangle\)
 * 2) Use the identity \(\hat{x}|x\rangle = x|x\rangle\) to remove the operator: \(\langle p|\hat{x}|\phi\rangle = \int \int dq\,dy \langle p|y\rangle\langle y|y|q\rangle\langle q|\phi\rangle\)
 * 3) Substitute the identity \(\langle x|p \rangle=\frac{e^{i xp/\hbar}}{\sqrt{2 \pi \hbar}}\): \(\langle p|\hat{x}|\phi\rangle = \int \int dq\,dy\,y \frac{e^{-i py/\hbar}}{\sqrt{2 \pi \hbar}}\frac{e^{i qy/\hbar}}{\sqrt{2 \pi \hbar}}\langle p|\phi\rangle\)
 * 4) Simplify: \(\langle p|\hat{x}|\phi\rangle = \int \int dq\,dy\,\frac{y}{2\pi\hbar}e^{iy(p-q)/\hbar}\langle p|\phi\rangle\)
 * 5) Substitute \(e^{iy{p-q}/\hbar}\) with its antiderivative, \(e^{iy{p-q}/\hbar}=\frac{-i\hbar}{y}\,\frac{\partial}{\partial p}e^{iy(p-q)/\hbar}\): \(\langle p|\hat{x}|\phi\rangle = \int \int dq\,dy\,\frac{1}{2\pi\hbar}(i\hbar)\frac{\partial}{\partial p}e^{iy(p-q)/\hbar}\langle p|\phi\rangle\)
 * 6) Take the partial derivative outside the integral: \(\langle p|\hat{x}|\phi\rangle = (i\hbar)\frac{\partial}{\partial p}\int \int dq\,dy\,\frac{1}{2\pi\hbar}e^{iy(p-q)/\hbar}\langle p|\phi\rangle\)
 * 7) Split the exponential back into two, the reverse of step 4: \(\langle p|\hat{x}|\phi\rangle = (i\hbar)\frac{\partial}{\partial p}\int \int dq\,dy\,\frac{e^{-i py/\hbar}}{\sqrt{2 \pi \hbar}}\frac{e^{i qy/\hbar}}{\sqrt{2 \pi \hbar}}\langle p|\phi\rangle\)
 * 8) Substitute the Dirac brackets back in, the reverse of step 3: \(\langle p|\hat{x}|\phi\rangle = (i\hbar)\frac{\partial}{\partial p}\int \int dq\,dy \langle p|y\rangle\langle y|q\rangle\langle q|\phi\rangle\)
 * 9) Solve the integrals, using the identities \(\mathbb{I}=\int dx|x\rangle\langle x|\) and \(\mathbb{I}=\int dp|p\rangle\langle p|\): \(\langle p|\hat{x}|\phi\rangle = i\hbar\frac{\partial}{\partial p}\langle p|\phi\rangle\)
 * 10) Put the equation in wavefunction form: \(\langle p|\hat{x}|\phi\rangle = i\hbar\frac{\partial}{\partial p}\phi(p)\)