47.2.3 problem 3

Internal problem ID [7419]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 3
Date solved : Sunday, March 30, 2025 at 11:58:33 AM
CAS classification : [_rational, _Bernoulli]

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

Maple. Time used: 0.005 (sec). Leaf size: 83
ode:=2*x*diff(y(x),x) = y(x)*(2*x^2-y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {2}\, \sqrt {\left (2 c_1 -\operatorname {Ei}_{1}\left (-x^{2}\right )\right ) {\mathrm e}^{x^{2}}}}{-2 c_1 +\operatorname {Ei}_{1}\left (-x^{2}\right )} \\ y &= \frac {\sqrt {2}\, \sqrt {\left (2 c_1 -\operatorname {Ei}_{1}\left (-x^{2}\right )\right ) {\mathrm e}^{x^{2}}}}{2 c_1 -\operatorname {Ei}_{1}\left (-x^{2}\right )} \\ \end{align*}
Mathematica. Time used: 0.284 (sec). Leaf size: 65
ode=2*x*D[y[x],x]==y[x]*(2*x^2-y[x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {e^{\frac {x^2}{2}}}{\sqrt {\frac {\operatorname {ExpIntegralEi}\left (x^2\right )}{2}+c_1}} \\ y(x)\to \frac {e^{\frac {x^2}{2}}}{\sqrt {\frac {\operatorname {ExpIntegralEi}\left (x^2\right )}{2}+c_1}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 1.319 (sec). Leaf size: 46
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*Derivative(y(x), x) - (2*x**2 - y(x)**2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {2} \sqrt {\frac {e^{x^{2}}}{C_{1} + \operatorname {Ei}{\left (x^{2} \right )}}}, \ y{\left (x \right )} = \sqrt {2} \sqrt {\frac {e^{x^{2}}}{C_{1} + \operatorname {Ei}{\left (x^{2} \right )}}}\right ] \]