55.2.49 problem 49

Internal problem ID [13275]
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 : 49
Date solved : Wednesday, October 01, 2025 at 05:02:29 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Riccati]

\begin{align*} x^{2} y^{\prime }&=a \,x^{2} y^{2}+b x y+c \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 59
ode:=x^2*diff(y(x),x) = a*x^2*y(x)^2+b*x*y(x)+c; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-1-b +\tan \left (\frac {\sqrt {4 c a -b^{2}-2 b -1}\, \left (\ln \left (x \right )-c_1 \right )}{2}\right ) \sqrt {4 c a -b^{2}-2 b -1}}{2 a x} \]
Mathematica. Time used: 0.167 (sec). Leaf size: 99
ode=x^2*D[y[x],x]==a*x^2*y[x]^2+b*x*y[x]+c; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {\sqrt {-4 a c+b^2+2 b+1} \left (1-\frac {2 c_1}{x^{\sqrt {-4 a c+b^2+2 b+1}}+c_1}\right )+b+1}{2 a x}\\ y(x)&\to -\frac {-\sqrt {-4 a c+b^2+2 b+1}+b+1}{2 a x} \end{align*}
Sympy. Time used: 0.169 (sec). Leaf size: 48
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-a*x**2*y(x)**2 - b*x*y(x) - c + x**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {b - \sqrt {4 a c - \left (b + 1\right )^{2}} \tan {\left (C_{1} + \frac {\sqrt {4 a c - \left (b + 1\right )^{2}} \log {\left (x \right )}}{2} \right )} + 1}{2 a x} \]