60.1.98 problem 100

Internal problem ID [10112]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 100
Date solved : Sunday, March 30, 2025 at 03:16:33 PM
CAS classification : [_rational, [_Riccati, _special]]

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

Maple. Time used: 0.002 (sec). Leaf size: 59
ode:=x*diff(y(x),x)+x*y(x)^2+a = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sqrt {a}\, \left (\operatorname {BesselJ}\left (0, 2 \sqrt {a}\, \sqrt {x}\right ) c_1 +\operatorname {BesselY}\left (0, 2 \sqrt {a}\, \sqrt {x}\right )\right )}{\sqrt {x}\, \left (c_1 \operatorname {BesselJ}\left (1, 2 \sqrt {a}\, \sqrt {x}\right )+\operatorname {BesselY}\left (1, 2 \sqrt {a}\, \sqrt {x}\right )\right )} \]
Mathematica. Time used: 0.249 (sec). Leaf size: 289
ode=x*D[y[x],x] + x*y[x]^2 + a==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {2 \sqrt {a} \sqrt {x} \operatorname {BesselY}\left (0,2 \sqrt {a} \sqrt {x}\right )+2 \operatorname {BesselY}\left (1,2 \sqrt {a} \sqrt {x}\right )-2 \sqrt {a} \sqrt {x} \operatorname {BesselY}\left (2,2 \sqrt {a} \sqrt {x}\right )-i \sqrt {a} c_1 \sqrt {x} \operatorname {BesselJ}\left (0,2 \sqrt {a} \sqrt {x}\right )-i c_1 \operatorname {BesselJ}\left (1,2 \sqrt {a} \sqrt {x}\right )+i \sqrt {a} c_1 \sqrt {x} \operatorname {BesselJ}\left (2,2 \sqrt {a} \sqrt {x}\right )}{4 x \operatorname {BesselY}\left (1,2 \sqrt {a} \sqrt {x}\right )-2 i c_1 x \operatorname {BesselJ}\left (1,2 \sqrt {a} \sqrt {x}\right )} \\ y(x)\to \frac {\sqrt {a} \sqrt {x} \operatorname {BesselJ}\left (0,2 \sqrt {a} \sqrt {x}\right )+\operatorname {BesselJ}\left (1,2 \sqrt {a} \sqrt {x}\right )-\sqrt {a} \sqrt {x} \operatorname {BesselJ}\left (2,2 \sqrt {a} \sqrt {x}\right )}{2 x \operatorname {BesselJ}\left (1,2 \sqrt {a} \sqrt {x}\right )} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a + x*y(x)**2 + x*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a/x + y(x)**2 + Derivative(y(x), x) cannot be solved by the factorable group method