Converting Dirac Notation to Coordinate Space I am trying to find how to explicitly calculate: $\langle x|p\rangle$. Intuitively, this means the momentum operator is acting on a state $\phi$ which is then projected into the coordinate space. Hence:
$$\langle x|p|\phi\rangle = \frac{\hbar}{i}\frac{\partial \phi}{\partial x}.$$
However, how do I show this explicitly using Dirac notation (if my conclusion is even correct)? My attempt:
$$\langle x|p|\phi\rangle = \int \langle x|p| x'\rangle\langle x'| \phi\rangle dx' = \int \langle x|\frac{h}{i} \partial_x| x'\rangle \phi(x') dx'    .$$
I am stuck on how to handle the derivative here. I know this is an identity that is commonly used, but an explanation of why it is true would be greatly helpful.
 A: There are typos in your expression: it should be $\phi(x')$, and there's no integration over $p$'s.  You're then taking the derivative w/r to $x$ but integrating w/r to $x'$ so:
\begin{align}
\langle x\vert p\vert\phi\rangle &= 
\int dx' \langle x\vert -i\hbar \partial_x \vert x'\rangle \langle x'\vert \phi\rangle \tag{1}
\end{align}
by $\langle x\vert \hat p=-i\hbar \partial_x \langle x\vert$.  Then pull out the derivative (you are integrating over $dx'$, not $dx$) to get
\begin{align}
\langle x\vert p\vert\phi\rangle= -i\hbar \partial_x \int dx'\langle x\vert x'\rangle\langle x'\vert \phi\rangle
\end{align}
and remove the identity $\mathbb{I}=\int dx' \vert x'\rangle\langle x'\vert$ to reach
$$
\langle x \vert p\vert\phi\rangle = -i\hbar\partial_x \langle x\vert \phi\rangle=-i\hbar \partial_x \phi(x)
$$
Nota:
To show $\langle x\vert \hat p=-i\hbar \partial_x\langle x\vert$, you need
\begin{align}
\langle x\vert p\rangle=\frac{1}{\sqrt{2\pi\hbar}}e^{ipx/\hbar} \, ,\qquad 
\mathbb{I}&=\int dp \vert p\rangle\langle p\vert
\end{align}
so that
\begin{align}
\langle x\vert \hat p=\int dp'\langle x\vert \hat p \vert p'\rangle 
\langle p'\vert&= \int dp' p' \langle x\vert p'\rangle 
\langle p'\vert\, ,\\
&= \int dp' p' \frac{1}{\sqrt{2\pi\hbar}}e^{ip'x/\hbar}
\langle p'\vert\, ,\\
&= -i \hbar \partial_x \int dp' \frac{1}{\sqrt{2\pi\hbar}}e^{ip'x/\hbar}
\langle p'\vert\, ,\\
&= -i \hbar \partial_x \int dp' \langle x\vert p'\rangle 
\langle p'\vert\, ,\\
&= -i\hbar \partial_x \langle x\vert \, .
\end{align}
In fact that's really the only thing you need: you could completely bypass the $\int dx' \vert x'\rangle\langle x'\vert$ step of Eq.(1)
A: You used $p = {1 \over i} \partial_{x}$ too soon. That expression is already in the position basis. Really what you should write is that
\begin{equation}
\langle x\prime|p| x\rangle = \delta(x-x\prime) {1 \over i}\partial_{x}
\end{equation}
From there, the integral becomes trivial, and you will find what you seek.
