23.1.326 problem 312 (b)

Internal problem ID [4933]
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 (b)
Date solved : Tuesday, September 30, 2025 at 09:03:16 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.001 (sec). Leaf size: 23
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: 3.642 (sec). Leaf size: 49
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 -\frac {e^{c_1}}{-\sqrt {a^2-x^2}+b e^{c_1}}\\ y(x)&\to 0\\ y(x)&\to -\frac {1}{b} \end{align*}
Sympy. Time used: 1.189 (sec). Leaf size: 54
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 ] \]