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 : Wednesday, March 05, 2025 at 08:31:13 AM
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.006 (sec). Leaf size: 25
ode:=x*diff(y(x),x)+y(x)^2*a-y(x)+b*x^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\tan \left (\sqrt {a b}\, \left (x +c_{1} \right )\right ) x \sqrt {a b}}{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