50.6.2 problem 1(b)

Internal problem ID [7894]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.8. Integrating Factors. Page 32
Problem number : 1(b)
Date solved : Sunday, March 30, 2025 at 12:36:20 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.005 (sec). Leaf size: 39
ode:=x*y(x)-1+(x^2-x*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= x -\sqrt {x^{2}-2 \ln \left (x \right )+2 c_1} \\ y &= x +\sqrt {x^{2}-2 \ln \left (x \right )+2 c_1} \\ \end{align*}
Mathematica. Time used: 0.415 (sec). Leaf size: 68
ode=(x*y[x]-1)+(x^2-x*y[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}} \sqrt {-x \left (x^2-2 \log (x)+c_1\right )} \\ y(x)\to x+x \left (-\frac {1}{x}\right )^{3/2} \sqrt {-x \left (x^2-2 \log (x)+c_1\right )} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) + (x**2 - x*y(x))*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out