# Non-commutativity of differential operators multiplied like a quadratic

I just read that if $$v$$ and $$w$$ are smooth functions of $$x$$ you can define operators $$\partial _x + v$$ and $$\partial _x + w$$. From there we find, $$(\partial _x + v)(\partial _x + w) = \partial _x ^2 + w' + (v+w)\partial_x + vw \\ (\partial _x + v)(\partial _x + w) = \partial _x ^2 + v' + (v+w)\partial_x + vw$$ Where do these $$w'$$ and $$v'$$ terms come from? I do not follow the logic of how they appear.

A really good way to make sure we don't miss terms like this is to use the method of a "test function." We have for some differentiable function $$f(x)$$ that

$$(\partial_x+v)(\partial_x+w)f = (\partial_x+v)(\partial_xf + wf) = \partial^2_xf + v\partial_xf + \partial_x(wf) + vwf.$$

It's from the third term that your $$w'$$ comes out:

$$(\partial_x+v)(\partial_x+w)f = (\partial_x+v)(\partial_xf + wf) = \partial^2_xf + v\partial_xf + w'f + w\partial_xf + vwf.$$

After evaluating fully, you can now say that since the final expression is true for "any" differentiable function $$f$$, the operator $$(\partial_x+v)(\partial_x+w)$$ is equivalent to the operator

$$\partial^2_x + v\partial_x + w' + w\partial_x + vw.$$

The logic is the same for the other operator.