Solution (source code)

= Solution

For a test <wavefunction> $f$,
$$
[x,p_x]f
=x(-i\hbar f')+i\hbar(xf)'
=i\hbar f.
$$
Thus the <canonical commutation relation> is
$$
\boxed{[x,p_x]=i\hbar I}.
$$