64.3.2 problem 2

Internal problem ID [13202]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.1 (Exact differential equations and integrating factors). Exercises page 37
Problem number : 2
Date solved : Monday, March 31, 2025 at 07:37:22 AM
CAS classification : [_exact, _rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`], [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.010 (sec). Leaf size: 58
ode:=y(x)^2+3+(2*x*y(x)-4)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {-i c_1 \left (x y^{2}+3 x -4 y\right ) \sqrt {3}+12 c_1 +i}{\left (-\sqrt {3}\, y x +4 \sqrt {3}-3 i x \right ) \left (\sqrt {3}+i y\right )} = 0 \]
Mathematica. Time used: 0.445 (sec). Leaf size: 79
ode=(y[x]^2+3)+(2*x*y[x]-4)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {2-\sqrt {-3 x^2+c_1 x+4}}{x} \\ y(x)\to \frac {2+\sqrt {-3 x^2+c_1 x+4}}{x} \\ y(x)\to -i \sqrt {3} \\ y(x)\to i \sqrt {3} \\ \end{align*}
Sympy. Time used: 0.932 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*x*y(x) - 4)*Derivative(y(x), x) + y(x)**2 + 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {2 - \sqrt {C_{1} x - 3 x^{2} + 4}}{x}, \ y{\left (x \right )} = \frac {\sqrt {C_{1} x - 3 x^{2} + 4} + 2}{x}\right ] \]