This is simple question, but I don't know how to do it.
$\left<x\right|\hat x\hat p-\hat p\hat x\left|x\right>=?$,
I can solve it in two ways.
One of them is $$\left<x\right|\hat x\hat p-\hat p\hat x\left|x\right>=\left<x\right|i \hslash\left|x\right>=i\hslash\delta(x,x)$$
The other is $$\left<x\right|\hat x\hat p-\hat p\hat x\left|x\right>=\left<x\right|(x-x)\hat p\left|x\right>=0$$
In my opinion, this problem comes from Dirac delta function.