88.2.4 problem 4

Internal problem ID [23954]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 1. Introduction. Exercise at page 16
Problem number : 4
Date solved : Thursday, October 02, 2025 at 09:47:38 PM
CAS classification : [_rational, _Riccati]

\begin{align*} y^{\prime }&=1-\frac {y^{2}}{x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 55
ode:=diff(y(x),x) = 1-y(x)^2/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\sqrt {-x}\, \left (\operatorname {BesselY}\left (1, 2 \sqrt {-x}\right ) c_1 +\operatorname {BesselJ}\left (1, 2 \sqrt {-x}\right )\right )}{\operatorname {BesselY}\left (0, 2 \sqrt {-x}\right ) c_1 +\operatorname {BesselJ}\left (0, 2 \sqrt {-x}\right )} \]
Mathematica. Time used: 0.101 (sec). Leaf size: 91
ode=D[y[x],x]==1-y[x]^2/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\sqrt {x} \left (-2 K_1\left (2 \sqrt {x}\right )+c_1 \operatorname {BesselI}\left (1,2 \sqrt {x}\right )\right )}{2 K_0\left (2 \sqrt {x}\right )+c_1 \operatorname {BesselI}\left (0,2 \sqrt {x}\right )}\\ y(x)&\to \frac {\sqrt {x} \operatorname {BesselI}\left (1,2 \sqrt {x}\right )}{\operatorname {BesselI}\left (0,2 \sqrt {x}\right )} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1 + y(x)**2/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Rational Solution doesnt exist