The paper by Fritz Schwarz, "Loewy decomposition of linear differential equations", contains the following lemma, which I try to prove in order to understand the algorithm which Schwarz describes and which goes back to Loewy:
Lemma: Determining the right irreducible factors of an ordinary operator up to order three with rational function coeffictents amounts to finding rational solutions of Riccati equations. A second order operator (with $D=\frac{d}{dx}$)
$D^2+AD+B, \; A,B \in \mathbb{Q}(x), \qquad \qquad (1)$
has a right factor $D+a, \; a \in \mathbb{Q}(x)$, if $a$ is a rational solution of
$a'-a^2+Aa-B=0. \qquad \qquad (2)$
A third order operator
$D^3+AD^2+BD+C, \; A,B,C \in \mathbb{Q}(x), \qquad \qquad (3)$
has a right factor $D+a, \; a \in \mathbb{Q}(x)$, if $a$ is a rational solution of
$a''-3aa'+a^3+A(a'-a^2)+Ba-C =0. \qquad \qquad$ (4)
It has a right factor $D^2+bD+c, \, b,c \in \mathbb{Q}(x)$, if b is a rational solution of
$ b''-3bb'+b^3+2A(b'-b^2)+(A'+A^2+B)b-B'-AB+C=0. \qquad \qquad $ (6)
Then $c=-(b'-b^2+Ab-B). \qquad (7) \qquad$ End of the lemma.
The author of the paper takes the proof to be obvious when dividing the given operator by the right factor and requiring that the division be exact, but I don't really see that for the second and the third case.
What we want to do with the help of this lemma is decompose a differential operator $L$ in order to solve the corresponding differential equation $Ly=0$, with y being the unknown function of x and A,B,C,a,b,c being rational functions of x. I understand that the operator product for differential operators is noncommutative and obeys the rule
$Da=aD+a'. \qquad \qquad (5)$
So in order to proof the lemma's first statement, I do the following: Polynomial division (in D) of (1) by $D+a$ gives me $D+A-a$, plus some rest $a^2-Aa+B$. Ignoring the rest for the moment, I build and simplify the operator product, paying attention to the above rule (5):
$(D+A-a)(D+a)= D^2+AD-aD+Da+Aa-a^2 = D^2+AD+a'+Aa-a^2 $,
and what follows is (2), if the division is to be exact. Now the same approach for proving the second statement. Polynomial division of (3) by $D+a$ gives $D^2+D(A-a)-Aa+a^2+B$ plus some rest. Again we build the product, multiply it out and try to simplify acording to (5):
\begin{align} &(D^2+DA-Da-Aa+a^2+B)(D+a) \\ &= D^3+DAD-DaD-AaD+a^2D+BD +D^2a+DAa-Da^2-Aa^2+a^3+Ba \\ &= D^3+((AD+A')D)-(D(Da-a'))-(DAa-(Aa)')+(Da^2-(a^2)')+BD+ \cdots \\ &= D^3+ (AD^2+A'D)-(D^2a-Da')-(DAa-A'a-Aa')+(Da^2-2aa')+BD+ \cdots \\ &= D^3+AD^2+BD+A'D+Da'+A'a+Aa'-2aa'-Aa^2+a^3+Ba. \end{align}
But this does not bring me to (4). In particular, I don't know how to get rid of the terms $A'D$ and $Da'$, where D still appears. What am I doing wrong? Or is my whole approach not valid?
Now I found the necessary trick:
$A'D+Da'=A'D+a'D+a''$,
and in order to make the two terms with D disappear, we find the condition $A'=-a'$. This substituted in the equation gives (4). So the rules employed were correct for proving this part, too.
Now the third part: Polynomial division gives $D+A-b$ plus some rest. We multiply and simplify
\begin{align} &(D+A-b)(D^2+bD+c) \\ &= D^3+AD^2-bD^2+DbD+AbD-b^2D+Dc+Ac-bc \\ &= D^3+AD^2-bD^2+(bD^2+b'D)+AbD-b^2D+(cD+c')+Ac-bc \\ &= D^3+AD^2+(\underbrace{b'+Ab-b^2+c}_{=B})D+\underbrace{c'+Ac-bc}_{=C}. \end{align}
So we get two equations. The first one is (7). We get (6) by differentiating (7), substituting therein c' by the second equation and then again c by (7).