2.2.3 Problem 3

2.2.3.1 Solved using first_order_ode_riccati
2.2.3.2 Maple
2.2.3.3 Mathematica
2.2.3.4 Sympy

Internal problem ID [13209]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number : 3
Date solved : Sunday, January 18, 2026 at 06:41:53 PM
CAS classification : [_Riccati]

2.2.3.1 Solved using first_order_ode_riccati

0.679 (sec)

Entering first order ode riccati solver

\begin{align*} y^{\prime }&=y^{2}+a^{2} x^{2}+b x +c \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= y^{2}+a^{2} x^{2}+b x +c \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = y^{2}+a^{2} x^{2}+b x +c \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=a^{2} x^{2}+b x +c\), \(f_1(x)=0\) and \(f_2(x)=1\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u} \tag {1} \end{align*}

Using the above substitution in the given ODE results (after some simplification) in a second order ODE to solve for \(u(x)\) which is

\begin{align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end{align*}

But

\begin{align*} f_2' &=0\\ f_1 f_2 &=0\\ f_2^2 f_0 &=a^{2} x^{2}+b x +c \end{align*}

Substituting the above terms back in equation (2) gives

\[ u^{\prime \prime }\left (x \right )+\left (a^{2} x^{2}+b x +c \right ) u \left (x \right ) = 0 \]
Unable to solve. Will ask Maple to solve this ode now.

The solution for \(u \left (x \right )\) is

\begin{equation} \tag{3} u \left (x \right ) = c_1 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+c_2 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}} \end{equation}
Taking derivative gives
\begin{equation} \tag{4} u^{\prime }\left (x \right ) = \frac {i c_1 \left (4 i a^{2} c +4 a^{3}-i b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}+1\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{8 a^{4}}+c_1 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (-\frac {i \left (x \,a^{2}+b \right )}{2 a}-\frac {i a x}{2}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+\frac {i c_2 \left (4 i a^{2} c +12 a^{3}-i b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}+1\right ], \left [\frac {5}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right )^{2} {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{24 a^{4}}+2 c_2 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) a^{2} {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+c_2 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) \left (-\frac {i \left (x \,a^{2}+b \right )}{2 a}-\frac {i a x}{2}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{u} \\ y &= -\frac {\frac {i c_1 \left (4 i a^{2} c +4 a^{3}-i b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}+1\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{8 a^{4}}+c_1 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (-\frac {i \left (x \,a^{2}+b \right )}{2 a}-\frac {i a x}{2}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+\frac {i c_2 \left (4 i a^{2} c +12 a^{3}-i b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}+1\right ], \left [\frac {5}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right )^{2} {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{24 a^{4}}+2 c_2 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) a^{2} {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+c_2 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) \left (-\frac {i \left (x \,a^{2}+b \right )}{2 a}-\frac {i a x}{2}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{c_1 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+c_2 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ y = -\frac {\frac {i \left (4 i a^{2} c +4 a^{3}-i b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}+1\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{8 a^{4}}+\operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (-\frac {i \left (x \,a^{2}+b \right )}{2 a}-\frac {i a x}{2}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+\frac {i c_3 \left (4 i a^{2} c +12 a^{3}-i b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}+1\right ], \left [\frac {5}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right )^{2} {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{24 a^{4}}+2 c_3 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) a^{2} {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+c_3 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) \left (-\frac {i \left (x \,a^{2}+b \right )}{2 a}-\frac {i a x}{2}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}}{\operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}+c_3 \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right ) \left (2 x \,a^{2}+b \right ) {\mathrm e}^{-\frac {i x \left (x \,a^{2}+b \right )}{2 a}}} \]
Simplifying the above gives
\begin{align*} y &= \frac {-48 \left (i a^{3}-\frac {1}{3} a^{2} c +\frac {1}{12} b^{2}\right ) c_3 \left (x \,a^{2}+\frac {b}{2}\right )^{2} \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +28 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {5}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+48 c_3 \left (i a^{4} x^{2}+i a^{2} b x +\frac {1}{4} i b^{2}-a^{3}\right ) a^{3} \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+24 \left (x \,a^{2}+\frac {b}{2}\right ) \left (\left (-i a^{3}+a^{2} c -\frac {1}{4} b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +20 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+i a^{3} \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )\right )}{48 a^{4} \left (c_3 \left (x \,a^{2}+\frac {b}{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+\frac {\operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )}{2}\right )} \\ \end{align*}

Summary of solutions found

\begin{align*} y &= \frac {-48 \left (i a^{3}-\frac {1}{3} a^{2} c +\frac {1}{12} b^{2}\right ) c_3 \left (x \,a^{2}+\frac {b}{2}\right )^{2} \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +28 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {5}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+48 c_3 \left (i a^{4} x^{2}+i a^{2} b x +\frac {1}{4} i b^{2}-a^{3}\right ) a^{3} \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+24 \left (x \,a^{2}+\frac {b}{2}\right ) \left (\left (-i a^{3}+a^{2} c -\frac {1}{4} b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +20 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+i a^{3} \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )\right )}{48 a^{4} \left (c_3 \left (x \,a^{2}+\frac {b}{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+\frac {\operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )}{2}\right )} \\ \end{align*}
2.2.3.2 Maple. Time used: 0.002 (sec). Leaf size: 393
ode:=diff(y(x),x) = y(x)^2+a^2*x^2+b*x+c; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-48 c_1 \left (x \,a^{2}+\frac {b}{2}\right )^{2} \left (i a^{3}-\frac {1}{3} a^{2} c +\frac {1}{12} b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +28 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {5}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+48 c_1 \,a^{3} \left (i a^{4} x^{2}+i a^{2} b x +\frac {1}{4} i b^{2}-a^{3}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+24 \left (x \,a^{2}+\frac {b}{2}\right ) \left (\left (-i a^{3}+a^{2} c -\frac {1}{4} b^{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +20 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+i a^{3} \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )\right )}{48 a^{4} \left (c_1 \left (x \,a^{2}+\frac {b}{2}\right ) \operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +12 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {3}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )+\frac {\operatorname {hypergeom}\left (\left [\frac {4 i a^{2} c +4 a^{3}-i b^{2}}{16 a^{3}}\right ], \left [\frac {1}{2}\right ], \frac {i \left (2 x \,a^{2}+b \right )^{2}}{4 a^{3}}\right )}{2}\right )} \]

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati Special 
trying Riccati sub-methods: 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE, diff(diff(y(x),x),x) = (-a^2*x^2-b*x-c)*y(x 
), y(x) 
      *** Sublevel 2 *** 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying a quadrature 
      checking if the LODE has constant coefficients 
      checking if the LODE is of Euler type 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      checking if the LODE is missing y 
      -> Trying a Liouvillian solution using Kovacics algorithm 
      <- No Liouvillian solutions exists 
      -> Trying a solution in terms of special functions: 
         -> Bessel 
         -> elliptic 
         -> Legendre 
         -> Whittaker 
            -> hyper3: Equivalence to 1F1 under a power @ Moebius 
         -> hypergeometric 
            -> heuristic approach 
            -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
            <- hyper3 successful: indirect Equivalence to 0F1 under ``^ @ Moebi\ 
us`` is resolved 
         <- hypergeometric successful 
      <- special function solution successful 
   <- Riccati to 2nd Order successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=y \left (x \right )^{2}+a^{2} x^{2}+b x +c \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=y \left (x \right )^{2}+a^{2} x^{2}+b x +c \end {array} \]
2.2.3.3 Mathematica. Time used: 0.633 (sec). Leaf size: 664
ode=D[y[x],x]==y[x]^2+a^2*x^2+b*x+c; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}
2.2.3.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-a**2*x**2 - b*x - c - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a**2*x**2 - b*x - c - y(x)**2 + Derivative(y(x), x) cannot be s
 
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] 
Sympy version 1.14.0
 
classify_ode(ode,func=y(x)) 
 
('1st_power_series', 'lie_group')