73.6.2 problem 7.2 (c)

Internal problem ID [15062]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 7. The exact form and general integrating fators. Additional exercises. page 141
Problem number : 7.2 (c)
Date solved : Thursday, March 13, 2025 at 05:33:39 AM
CAS classification : [[_homogeneous, `class G`], _exact, _rational, _Bernoulli]

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

Maple. Time used: 0.034 (sec). Leaf size: 38
ode:=exp(x*y(x)^2-x^2)*(y(x)^2-2*x)+2*exp(x*y(x)^2-x^2)*x*y(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {x \left (x^{2}-c_{1} \right )}}{x} \\ y &= -\frac {\sqrt {x \left (x^{2}-c_{1} \right )}}{x} \\ \end{align*}
Mathematica. Time used: 0.116 (sec). Leaf size: 42
ode=Exp[x*y[x]^2-x^2]*(y[x]^2-2*x)+Exp[x*y[x]^2-x^2]*2*x*y[x]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {x^2+c_1}}{\sqrt {x}} \\ y(x)\to \frac {\sqrt {x^2+c_1}}{\sqrt {x}} \\ \end{align*}
Sympy. Time used: 0.476 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x)*exp(-x**2 + x*y(x)**2)*Derivative(y(x), x) + (-2*x + y(x)**2)*exp(-x**2 + x*y(x)**2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {\frac {C_{1}}{x} + x}, \ y{\left (x \right )} = \sqrt {\frac {C_{1}}{x} + x}\right ] \]