60.1.95 problem 97

Internal problem ID [10109]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 97
Date solved : Sunday, March 30, 2025 at 03:16:23 PM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

\begin{align*} x y^{\prime }+a y^{2}-y+b \,x^{2}&=0 \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 25
ode:=x*diff(y(x),x)+a*y(x)^2-y(x)+b*x^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\tan \left (\left (c_1 +x \right ) \sqrt {b a}\right ) x \sqrt {b a}}{a} \]
Mathematica. Time used: 0.096 (sec). Leaf size: 32
ode=x*D[y[x],x] + a*y[x]^2 - y[x] + b*x^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{a K[1]^2+b}dK[1]=-x+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a*y(x)**2 + b*x**2 + x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded