2.2 problem 2

Internal problem ID [10342]

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} \]

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.79 (sec). Leaf size: 192

DSolve[y'[x]==y[x]^2-a^2*x^2+3*a,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*}