23.1.355 problem 341

Internal problem ID [4962]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 341
Date solved : Tuesday, September 30, 2025 at 09:05:54 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Riccati]

\begin{align*} a \,x^{2} y^{\prime }&=x^{2}+a x y+b^{2} y^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 19
ode:=a*x^2*diff(y(x),x) = x^2+a*x*y(x)+b^2*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tan \left (\frac {b \left (\ln \left (x \right )+c_1 \right )}{a}\right ) x}{b} \]
Mathematica. Time used: 0.184 (sec). Leaf size: 23
ode=a*x^2*D[y[x],x]==x^2+a*x*y[x]+b^2*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x \tan \left (\frac {b (\log (x)+a c_1)}{a}\right )}{b} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a*x**2*Derivative(y(x), x) - a*x*y(x) - b**2*y(x)**2 - x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : cannot determine truth value of Relational: -1 < 2*b