# Riccati equation

In mathematics, a Riccati equation in the narrowest sense is any first-order ordinary differential equation that is quadratic in the unknown function. In other words, it is an equation of the form $y'(x)=q_{0}(x)+q_{1}(x)\,y(x)+q_{2}(x)\,y^{2}(x)$ where $q_{0}(x)\neq 0$ and $q_{2}(x)\neq 0$. If $q_{0}(x)=0$ the equation reduces to a Bernoulli equation, while if $q_{2}(x)=0$ the equation becomes a first order linear ordinary differential equation.
The equation is named after Jacopo Riccati (1676–1754).
More generally, the term Riccati equation is used to refer to matrix equations with an analogous quadratic term, which occur in both continuous-time and discrete-time linear-quadratic-Gaussian control. The steady-state (non-dynamic) version of these is referred to as the algebraic Riccati equation.

## Conversion to a second order linear equation

The non-linear Riccati equation can always be converted to a second order linear ordinary differential equation (ODE): If $y'=q_{0}(x)+q_{1}(x)y+q_{2}(x)y^{2}$ then, wherever q$_2$ is non-zero and differentiable, $v=yq_{2}$ satisfies a Riccati equation of the form $v'=v^{2}+R(x)v+S(x),$ where $S=q_{2}q_{0}$ and $R=q_{1}+{\tfrac {q_{2}'}{q_{2}}},$ because ${\begin{aligned}v'&=(yq_{2})'\\[4pt]&=y'q_{2}+yq_{2}'\\&=(q_{0}+q_{1}y+q_{2}y^{2})q_{2}+v{\frac {q_{2}'}{q_{2}}}\\&=q_{0}q_{2}+\left(q_{1}+{\frac {q_{2}'}{q_{2}}}\right)v+v^{2}\end{aligned}}$ Substituting $v=-{\tfrac {u'}{u}},$ it follows that u satisfies the linear second-order ODE $u''-R(x)u'+S(x)u=0$ since ${\begin{aligned}v'&=-\left({\frac {u'}{u}}\right)'\\[2pt]&=-\left({\frac {u''}{u}}\right)+\left({\frac {u'}{u}}\right)^{2}\\[2pt]&=-\left({\frac {u''}{u}}\right)+v^{2}\end{aligned}}$ so that ${\begin{aligned}{\frac {u''}{u}}&=v^{2}-v'\\&=-S-Rv\\&=-S+R{\frac {u'}{u}}\end{aligned}}$ and hence $u''-Ru'+Su=0.$
Then substituting the two solutions of this linear second order equation into the transformation $y=-{\frac {u'}{q_{2}u}}=-q_{2}^{-1}{\bigl\log(u){\bigr )}'$ suffices to have global knowledge of the general solution of the Riccati equation by the formula: $y=-q_{2}^{-1}{\bigl\log(c_{1}u_{1}+c_{2}u_{2}){\bigr )}'.$

## Complex analysis

In complex analysis, the Riccati equation occurs as the first-order nonlinear ODE in the complex plane of the form ${\frac {dw}{dz}}=F(w,z)={\frac {P(w,z)}{Q(w,z)}},$ where $P$ and $Q$ are polynomials in $w$ and locally analytic functions of $z\in \mathbb {C}$, i.e., $F$ is a complex rational function. The only equation of this form that is of Painlevé type, is the Riccati equation ${\frac {dw(z)}{z}}=A_{0}(z)+A_{1}(z)w+A_{2}(z)w^{2},$ where $A_{i}(z)$ are (possibly matrix) functions of $z$.

### Application to the Schwarzian equation

An important application of the Riccati equation is to the 3rd order Schwarzian differential equation $S(w):=\left({\frac {w''}{w'}}\right)'-{\frac {1}{2}}\left({\frac {w''}{w'}}\right)^{2}=f$ which occurs in the theory of conformal mapping and univalent functions. In this case the ODEs are in the complex domain and differentiation is with respect to a complex variable. (The Schwarzian derivative S(w) has the remarkable property that it is invariant under Möbius transformations, i.e. $S{\bigl{\tfrac {aw+b}{cw+d}}{\bigr )}=S(w)$ whenever $ad-bc$ is non-zero.) The function $y={\tfrac {w''}{w'}}$ satisfies the Riccati equation $y'={\frac {1}{2}}y^{2}+f.$ By the above $y=-2{\tfrac {u'}{u}}$ where u is a solution of the linear ODE $u''+{\frac {1}{2}}fu=0.$ Since ${\tfrac {w''}{w'}}=-2{\tfrac {u'}{u}},$ integration gives $w'={\tfrac {C}{u^{2}}}$ for some constant C. On the other hand any other independent solution U of the linear ODE has constant non-zero Wronskian $U'u-Uu'$ which can be taken to be C after scaling. Thus $w'={\frac {U'u-Uu'}{u^{2}}}=\left({\frac {U}{u}}\right)'$ so that the Schwarzian equation has solution $w={\tfrac {U}{u}}.$

## Obtaining solutions by quadrature

The correspondence between Riccati equations and second-order linear ODEs has other consequences. For example, if one solution of a 2nd order ODE is known, then it is known that another solution can be obtained by quadrature, i.e., a simple integration. The same holds true for the Riccati equation. In fact, if one particular solution y$_1$ can be found, the general solution is obtained as $y=y_{1}+u$ Substituting $y_{1}+u$ in the Riccati equation yields $y_{1}'+u'=q_{0}+q_{1}\cdot (y_{1}+u)+q_{2}\cdot (y_{1}+u)^{2},$ and since $y_{1}'=q_{0}+q_{1}\,y_{1}+q_{2}\,y_{1}^{2},$ it follows that $u'=q_{1}\,u+2\,q_{2}\,y_{1}\,u+q_{2}\,u^{2}$ or $u'-(q_{1}+2\,q_{2}\,y_{1})\,u=q_{2}\,u^{2},$ which is a Bernoulli equation. The substitution that is needed to solve this Bernoulli equation is $z={\frac {1}{u}}$ Substituting $y=y_{1}+{\frac {1}{z}}$ directly into the Riccati equation yields the linear equation $z'+(q_{1}+2\,q_{2}\,y_{1})\,z=-q_{2}$ A set of solutions to the Riccati equation is then given by $y=y_{1}+{\frac {1}{z}}$ where z is the general solution to the aforementioned linear equation.