I've just began studying some quantum mechanics, and I'm not sure why certain rules in operator algebra are correct. For instance, in this book it is stated that
$$\left(\frac{d}{dx}+v(x)\right)\left(\frac{d}{dx}+w(x)\right)= \frac{d^2}{dx^2}+\frac{dw}{dx}+(v(x)+w(x))\frac{d}{dx}+vw.$$
when I try to work it out
$$\left(\frac{d}{dx}+v(x)\right)\left(\frac{d}{dx}+w(x)\right)= \frac{d}{dx}\left(\frac{d}{dx}+w(x)\right)+v(x)\left(\frac{d}{dx}+w(x)\right)$$
$$=\frac{d^2}{dx^2}+\frac{dw}{dx}+v(x)\frac{d}{dx}+v(x)w(x)$$
Why is the result cited in the book true but mine not?
We have $(\frac{d}{dx}w(x))f=\frac{d}{dx}(w\cdot f)=w\cdot f'+w'\cdot f=(w\frac{d}{dx}+w')f$. It is not true that multiplication by $w$ followed by differentiation is the same as multiplication by $w'$.