89.3.4 problem 4

Internal problem ID [24302]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 34
Problem number : 4
Date solved : Thursday, October 02, 2025 at 10:12:42 PM
CAS classification : [_exact, _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} y^{2}-2 y x +6 x -\left (x^{2}-2 y x +2\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 71
ode:=y(x)^2-2*x*y(x)+6*x-(x^2-2*x*y(x)+2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {x^{2}+2+\sqrt {x^{4}-12 x^{3}-4 c_1 x +4 x^{2}+4}}{2 x} \\ y &= \frac {x^{2}+2-\sqrt {x^{4}-12 x^{3}-4 c_1 x +4 x^{2}+4}}{2 x} \\ \end{align*}
Mathematica. Time used: 0.399 (sec). Leaf size: 93
ode=(y[x]^2-2*x*y[x]+6*x)-( x^2-2*x*y[x]+2 )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^2-i \sqrt {-x^4+12 x^3-4 x^2-4 c_1 x-4}+2}{2 x}\\ y(x)&\to \frac {x^2+i \sqrt {-x^4+12 x^3-4 x^2-4 c_1 x-4}+2}{2 x} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x) + 6*x - (x**2 - 2*x*y(x) + 2)*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out