55.2.13 problem 13

Internal problem ID [13239]
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 : 13
Date solved : Wednesday, October 01, 2025 at 03:55:32 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Riccati, _special]]

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