23.1.365 problem 350

Internal problem ID [4972]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 350
Date solved : Tuesday, September 30, 2025 at 09:06:36 AM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

\begin{align*} x^{3} y^{\prime }&=x^{2} \left (y-1\right )+y^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 17
ode:=x^3*diff(y(x),x) = x^2*(y(x)-1)+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\tanh \left (\frac {c_1 x -1}{x}\right ) x \]
Mathematica. Time used: 0.051 (sec). Leaf size: 37
ode=x^3*D[y[x],x]==x^2*(y[x]-1)+y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{(K[1]-1) (K[1]+1)}dK[1]=-\frac {1}{x}+c_1,y(x)\right ] \]
Sympy. Time used: 0.201 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**3*Derivative(y(x), x) - x**2*(y(x) - 1) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \left (C_{1} e^{\frac {2}{x}} + 1\right )}{C_{1} e^{\frac {2}{x}} - 1} \]