3.39 How to convert Riccati general ode to second order ode?

The general Riccati ode is

\[ y'(x) = f_0(x)+ f_1(x) y(x) + f_2(x) y^2(x) \]

This can be converted to second order linear ode in \(u(x)\) using the transformation

\[ y = \frac {-u' }{ f_2 u } \]

Which results, after some simplifications in the ode

\[ u'' - \left ( \frac {f_{2}'}{f_2} + f_1 \right ) u' + f_0 f_2 u = 0 \]

The following Maple code does the above

riccati_ode:= diff(y(x),x)= f__0(x)+f__1(x)*y(x)+f__2(x)*y(x)^2; 
 
Typesetting:-Unsuppress('all'); #always do this. 
Typesetting:-Settings(prime=x,'typesetprime'=true); #this says to use y'(x) instead of dy/dx 
Typesetting:-Suppress(u(x)); # this says to use y' and not y'(x) 
 
PDEtools:-dchange( {y(x)= -diff(u(x),x)/(f__2(x)*u(x))},riccati_ode,{u}); 
(lhs-rhs)(%); 
numer(normal(%)); 
collect(%,[diff(u(x),x),diff(u(x),x$2)]); 
map(X->X/f__2(x),%); 
new_U_ode:=-%=0;
 

Gives

   new_U_ode := -(f__2(x)*f__1(x) + diff(f__2(x), x))*diff(u(x), x)/f__2(x) + f__0(x)*f__2(x)*u(x) + diff(u(x), x, x) = 0