23.1.325 problem 312 (a)

Internal problem ID [4932]
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 : 312 (a)
Date solved : Tuesday, September 30, 2025 at 09:03:13 AM
CAS classification : [_separable]

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