Solving the Riccati equation $y'=ay^2+f(x)y+b$ I would like to know if someone knows a method to solve the following Riccati equation
$$y'=ay^2+f(x)y+b$$
where of course $y'=\frac{dy}{dx}$, $f$ is a continuous function and $a,b$ are constants. I know that if $f=C$ with $C$ a constant the equation is a separable equation, but I don't know what happen in the general case.
If someone could give some advice, I will really appreciate it.
 A: For a more general case where $a$ and $b$ are not constants but functions of $x$, it is better to first substitute $y=\frac{t(x)}{a(x)}$, where $t(x)$ is a non-zero, differentiable function of $x$ and then $t(x)=\frac{-p'(x)}{p(x)}$, where $p(x)$ is a non-zero, twice differentiable function of $x$.
However, in your special case of a Riccati's equation
$$y' = ay^2+f(x)y+b \tag{i}$$
where $a$ and $b$ are constants, a direct substitution of
$$y=\frac{-p'(x)}{ap(x)} \tag{ii}$$
will reduce $\text{(i)}$ to a second order linear differential equation
\begin{align} 
y' &= \frac{1}{a} (-p' p^{-1})' \\
&= \frac{1}{a} \left(-p' \frac{-1}{p^2} p' + p^{-1}(-p'') \right) \\
&= \frac{1}{a} \left( \left(\frac{p'}{p}\right)^2 - \frac{p''}{p} \right) \\
&= \frac{1}{a} \left(a^2y^2-\frac{p''}{p} \right) \\
&= ay^2-\frac{p''}{pa}
\end{align}
where in the second last line we used $\frac{p'}{p}=-ay$. Using $\text{(i)}$, we can then replace $y'$ to get
\begin{align}\require{cancel}
\cancel{ay^2}+f(x)y+b &= \cancel{ay^2}-\frac{p''}{pa} \\
\implies p a f(x) \left(-\frac{p''}{pa} \right) + pab &= -p'' \\
\implies p''-f(x)p'+abp &= 0
\end{align}
You can then solve this second order linear differential equation in the dependent variable $p$. Finally, the solution of $\text{(i)}$ is given by $\text{(ii)}$.
