Solution (source code)

= Solution

Differentiate $z'=yz$ without dividing by $z$:
$$
z''=(y'+y^2)z=[(a+b)y-ab]z=(a+b)z'-abz.
$$
Thus the <linearization of a Riccati equation> gives
$$
\boxed{z''-(a+b)z'+abz=0.}
$$
Its <characteristic polynomial> is $(\lambda-a)(\lambda-b)$, explaining both the distinct-root exponentials and the repeated-root factor $A+Bx$. Nonzero solutions reconstruct $y=z'/z$ between their zeros; the identically zero $z$ also satisfies the linear equation.