29.3.11 problem 65

Internal problem ID [4673]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 3
Problem number : 65
Date solved : Sunday, March 30, 2025 at 03:35:55 AM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=x \left (2+x^{2} y-y^{2}\right ) \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 51
ode:=diff(y(x),x) = x*(2+x^2*y(x)-y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\operatorname {erf}\left (\frac {x^{2}}{2}\right ) \sqrt {\pi }\, c_1 \,x^{2}+x^{2} \sqrt {\pi }+2 \,{\mathrm e}^{-\frac {x^{4}}{4}} c_1}{\sqrt {\pi }\, \left (\operatorname {erf}\left (\frac {x^{2}}{2}\right ) c_1 +1\right )} \]
Mathematica. Time used: 0.42 (sec). Leaf size: 74
ode=D[y[x],x]==x*(2+x^2*y[x]-y[x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {e \sqrt {\pi } x^2 \text {erf}\left (\frac {x^2}{2}\right )+2 e^{1-\frac {x^4}{4}}+2 c_1 x^2}{e \sqrt {\pi } \text {erf}\left (\frac {x^2}{2}\right )+2 c_1} \\ y(x)\to x^2 \\ \end{align*}
Sympy. Time used: 9.763 (sec). Leaf size: 92
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(x**2*y(x) - y(x)**2 + 2) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {4 x^{6} e^{\frac {x^{4}}{4}} + 32 x^{2} e^{\frac {x^{4}}{4}} - 3 x^{2} e^{\frac {x^{4}}{2}} \operatorname {Ei}{\left (- \frac {x^{4}}{4} \right )} - 16 e^{\frac {x^{4}}{4}}}{4 x^{4} e^{\frac {x^{4}}{4}} + 32 e^{\frac {x^{4}}{4}} - 3 e^{\frac {x^{4}}{2}} \operatorname {Ei}{\left (- \frac {x^{4}}{4} \right )}} \]