55.2.58 problem 58

Internal problem ID [13284]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number : 58
Date solved : Wednesday, October 01, 2025 at 05:47:02 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\begin{align*} \left (a \,x^{2}+b \right ) y^{\prime }+y^{2}-2 x y+\left (1-a \right ) x^{2}-b&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 31
ode:=(a*x^2+b)*diff(y(x),x)+y(x)^2-2*x*y(x)+(-a+1)*x^2-b = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x +\frac {\sqrt {b a}}{c_1 \sqrt {b a}+\arctan \left (\frac {a x}{\sqrt {b a}}\right )} \]
Mathematica. Time used: 0.255 (sec). Leaf size: 38
ode=(a*x^2+b)*D[y[x],x]+y[x]^2-2*x*y[x]+(1-a)*x^2-b==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x+\frac {1}{-\int _1^x-\frac {1}{a K[1]^2+b}dK[1]+c_1}\\ y(x)&\to x \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-b + x**2*(1 - a) - 2*x*y(x) + (a*x**2 + b)*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out