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

Method

 * 1) Put the product \(\langle x|\hat{p}|\phi\rangle\) into integral form as described here: \(\langle x|\hat{p}|\phi\rangle = \int \int dq\,dy \langle x|q\rangle\langle q|\hat{p}|y\rangle\langle y|\phi\rangle\)
 * 2) Use the identity \(\hat{p}|p\rangle = p|p\rangle\) to remove the operator: \(\langle x|\hat{p}|\phi\rangle = \int \int dq\,dy \langle x|q\rangle\langle q|q|y\rangle\langle y|\phi\rangle\)
 * 3) Substitute the identity \(\langle x|p \rangle=\frac{e^{i xp/\hbar}}{\sqrt{2 \pi \hbar}}\): \(\langle x|\hat{p}|\phi\rangle = \int \int dq\,dy\,q \frac{e^{i xq/\hbar}}{\sqrt{2 \pi \hbar}}\frac{e^{-i yq/\hbar}}{\sqrt{2 \pi \hbar}}\langle y|\phi\rangle\)
 * 4) Simplify: \(\langle x|\hat{p}|\phi\rangle = \int \int dq\,dy\,\frac{q}{2\pi\hbar}e^{iq(x-y)/\hbar}\langle y|\phi\rangle\)
 * 5) Substitute \(e^{iq{x-y}/\hbar}\) with its antiderivative, \(e^{iq{x-y}/\hbar}=\frac{-i\hbar}{q}\,\frac{\partial}{\partial x}e^{iq{x-y}/\hbar}\): \(\langle x|\hat{p}|\phi\rangle = \int \int dq\,dy\,\frac{1}{2\pi\hbar}(-i\hbar)\frac{\partial}{\partial x}e^{iq(x-y)/\hbar}\langle y|\phi\rangle\)
 * 6) Take the partial derivative outside the integral: \(\langle x|\hat{p}|\phi\rangle = (-i\hbar)\frac{\partial}{\partial x}\int \int dq\,dy\,\frac{1}{2\pi\hbar}e^{iq(x-y)/\hbar}\langle y|\phi\rangle\)
 * 7) Split the exponential back into two, the reverse of step 4: \(\langle x|\hat{p}|\phi\rangle = (-i\hbar)\frac{\partial}{\partial x}\int \int dq\,dy\,\frac{e^{i xq/\hbar}}{\sqrt{2 \pi \hbar}}\frac{e^{-i yq/\hbar}}{\sqrt{2 \pi \hbar}}\langle y|\phi\rangle\)
 * 8) Substitute the Dirac brackets back in, the reverse of step 3: \(\langle x|\hat{p}|\phi\rangle = (-i\hbar)\frac{\partial}{\partial x}\int \int dq\,dy \langle x|q\rangle\langle q|y\rangle\langle y|\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 x|\hat{p}|\phi\rangle = -i\hbar\frac{\partial}{\partial x}\langle x|\phi\rangle\)
 * 10) Put the equation in wavefunction form: \(\langle x|\hat{p}|\phi\rangle = -i\hbar\frac{\partial}{\partial x}\phi(x)\)