Commutation $[x,p]=i\hbar$ if we have position operator x and momentum operator p as follows:
$$ \hat x = x \space ; \space \hat p = - i \hbar {∂ \over ∂x} \space $$
How do we show the commutator is:
$$ [\hat x, \hat p] = i \hbar$$
I am stuck at:
$$ [\hat x, \hat p] = x \space (-i \hbar {∂ \over ∂x}) - (-i \hbar {∂ \over ∂x}) \space x = i \hbar \left ( {∂x \over ∂x} - x \space {∂ \over ∂x} \right ) $$
To my untrained eye it seems we must have the following (how come?):
$$ 1 - x \space {∂ \over ∂x} = 1 \implies x \space{∂ \over ∂x} = 0 $$
 A: It sounds as though you're still getting a grip on what an operator is in QM. Read that idea literally: they're operators on smooth functions, so give them something to eat! $\hat{x}$ takes a smooth function $f(x)$ and sends it to $x\,f(x)$. So now, work out what, say, the operators $f(x)\mapsto x\,f(x)$ and $f(x)\mapsto \mathrm{d}_x f(x)$ do when you form their commutator. The first term $\hat{x}\,\hat{p}$ is a chain of two steps: $\hat{p}$ acts first, then $\hat{x}$. So we have the chain of transformations $f(x) \mapsto \mathrm{d}_x f(x) \mapsto x\,\mathrm{d}_x f(x)$. Do the same with the second term, subtract them and the commutator works out to $f(x)\mapsto x\,\mathrm{d}_x f(x) - \mathrm{d}_x (x\,f(x))$.
Now I've not quite done your problem, but it's the same idea. Add in the scaling constants in $\hat{p}$ and expand the commutator using Leibnitz's rule. You should then get it!
A: You can also add wavefuction:
$[\hat{x}, \hat{p}]\ \psi = x (- i \hbar \frac{\partial}{\partial x}) \psi -  (- i \hbar \frac{\partial}{ \partial x}) x\psi = i\hbar \psi  $ and thefore 
$[\hat{x}, \hat{p}]\ = i\hbar $.
