I know that the commutator is defined as $[A,B]=AB-BA$, but if $A$ and $B$ are operators, how do I multiply operators? For example, if I have
$$A=-4 \partial_x^3 + 6u(x,t) \partial_x + 3u_x$$
and
$$ B=-\partial_x^2 + u(x,t),$$
how do I obtain the commutator?
Take a function $f$, then define $[A,\,B]$ as the operator satisfying $[A,\,B]f=A(Bf)-B(Af)$. For example, if $g$ is a function and $I$ is the identity operator,$$[\partial_x,\,gI]f=\partial_x(gf)-g\partial_x f=(\partial_x g)f\implies[\partial_x,\,gI]=(\partial_x g)\cdot I.$$We usually drop the explicit $I$s, viz. $[\partial_x,\,gI]=(\partial_x g)$.