75.7.14 problem 189

Internal problem ID [16728]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 7, Total differential equations. The integrating factor. Exercises page 61
Problem number : 189
Date solved : Thursday, March 13, 2025 at 08:39:20 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class B`]]

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

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