55.2.2 problem 2

Internal problem ID [13228]
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 : 2
Date solved : Wednesday, October 01, 2025 at 03:39:09 AM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=y^{2}-a^{2} x^{2}+3 a \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 82
ode:=diff(y(x),x) = y(x)^2-a^2*x^2+3*a; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 a x \,{\mathrm e}^{a \,x^{2}}-c_1 \sqrt {\pi }\, \left (x^{2} \left (-a \right )^{{3}/{2}}+\sqrt {-a}\right ) \operatorname {erf}\left (\sqrt {-a}\, x \right )+a \,x^{2}-1}{\operatorname {erf}\left (\sqrt {-a}\, x \right ) \sqrt {\pi }\, \sqrt {-a}\, c_1 x +c_1 \,{\mathrm e}^{a \,x^{2}}+x} \]
Mathematica. Time used: 0.308 (sec). Leaf size: 192
ode=D[y[x],x]==y[x]^2-a^2*x^2+3*a; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {a x \operatorname {ParabolicCylinderD}\left (-2,i \sqrt {2} \sqrt {a} x\right )+i \sqrt {2} \sqrt {a} \operatorname {ParabolicCylinderD}\left (-1,i \sqrt {2} \sqrt {a} x\right )-a c_1 x \operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )+\sqrt {2} \sqrt {a} c_1 \operatorname {ParabolicCylinderD}\left (2,\sqrt {2} \sqrt {a} x\right )}{\operatorname {ParabolicCylinderD}\left (-2,i \sqrt {2} \sqrt {a} x\right )+c_1 \operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )}\\ y(x)&\to \frac {\sqrt {2} \sqrt {a} \operatorname {ParabolicCylinderD}\left (2,\sqrt {2} \sqrt {a} x\right )}{\operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )}-a x \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a**2*x**2 - 3*a - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a**2*x**2 - 3*a - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method