2.2 problem 2

Internal problem ID [9585]

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.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_Riccati]

\[ \boxed {y^{\prime }-y^{2}+a^{2} x^{2}-3 a=0} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 108

dsolve(diff(y(x),x)=y(x)^2-a^2*x^2+3*a,y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {{\mathrm e}^{\frac {a \,x^{2}}{2}} c_{1} a x +\left (\left (-c_{1} x^{2} \sqrt {\pi }\, \left (-a \right )^{\frac {3}{2}}-\sqrt {\pi }\, \sqrt {-a}\, c_{1} \right ) \operatorname {erf}\left (x \sqrt {-a}\right )+a \,x^{2}-1\right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{{\mathrm e}^{\frac {a \,x^{2}}{2}} c_{1} +\left (\operatorname {erf}\left (x \sqrt {-a}\right ) \sqrt {\pi }\, \sqrt {-a}\, c_{1} x +x \right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}} \]

Solution by Mathematica

Time used: 0.491 (sec). Leaf size: 94

DSolve[y'[x]==y[x]^2-a^2*x^2+3*a,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to a x+\frac {\sqrt {a} \left (\sqrt {\pi } \left (\text {erfi}\left (\sqrt {a} x\right )+i\right )-\sqrt {2} c_1\right )}{2 e^{a x^2} \operatorname {HermiteH}\left (-2,i \sqrt {a} x\right )+\sqrt {2} \sqrt {a} c_1 x} \\ y(x)\to a x-\frac {1}{x} \\ \end{align*}