78.8.8 problem 8

Internal problem ID [18135]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 8
Date solved : Monday, March 31, 2025 at 05:13:05 PM
CAS classification : [_separable]

\begin{align*} x y^{\prime }+y&=x^{2} y^{\prime }+y^{2} \end{align*}

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