60.1.138 problem 141

Internal problem ID [10152]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 141
Date solved : Wednesday, March 05, 2025 at 08:33:54 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Riccati]

\begin{align*} x^{2} \left (y^{\prime }+y^{2}\right )+a x y+b&=0 \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 50
ode:=x^2*(diff(y(x),x)+y(x)^2)+a*x*y(x)+b = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1-a +\tanh \left (\frac {\sqrt {a^{2}-2 a -4 b +1}\, \left (\ln \left (x \right )-c_{1} \right )}{2}\right ) \sqrt {a^{2}-2 a -4 b +1}}{2 x} \]
Mathematica. Time used: 0.232 (sec). Leaf size: 90
ode=x^2*(D[y[x],x]+y[x]^2) + a*x*y[x] + b==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\sqrt {a^2-2 a-4 b+1} \left (1-\frac {2 c_1}{x^{\sqrt {a^2-2 a-4 b+1}}+c_1}\right )-a+1}{2 x} \\ y(x)\to -\frac {\sqrt {a^2-2 a-4 b+1}+a-1}{2 x} \\ \end{align*}
Sympy. Time used: 0.287 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a*x*y(x) + b + x**2*(y(x)**2 + Derivative(y(x), x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- a - \sqrt {4 b - \left (a - 1\right )^{2}} \tan {\left (C_{1} + \frac {\sqrt {4 b - \left (a - 1\right )^{2}} \log {\left (x \right )}}{2} \right )} + 1}{2 x} \]