When a 2nd-order differential equation is represented as something like: $\big(D^2+(a+b)D+ab\big)(y) = \big((D+a)(D+b)\big)y$.
I don't understand how it can then by solved as: $Du+au$ where $u = (D+b)y$.
I don't understand why this works because when there is a function like: $f(x) = \big(a(x)+b(x)\big)c(x) = \big((a+b)c\big)(x)$, it can't just become $a(u)+b(u)$ where $u = c(x)$. Therefore, why shouldn't this logic apply to the $D$ operator? Does it have something do do with the fundamental difference between operators and functions?
This works because addition and multiplication by a constant and differentiation commute:
$$D(ay+bz)=aDy+bDz.$$
That makes the $D$ operator behave like a polynomial variable.
$$(D+a)y=Dy+ay,$$ $$(D+a)(D+b)y=(D+a)(Dy+by) \\=D(Dy+by)+a(Dy+by) \\=D^2y+Dby+aDy+aby \\=D^2y+bDy+aDy+aby \\=D^2y+(b+a)Dy+aby \\=(D^2+(b+a)D+ab)y.$$
This is not more true when the coefficients are not constant,
$$D(a(x)y)\ne a(x)Dy.$$