23.1.322 problem 310 (a)

Internal problem ID [4929]
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 : 310 (a)
Date solved : Tuesday, September 30, 2025 at 09:00:36 AM
CAS classification : [_rational, _Bernoulli]

\begin{align*} \left (a^{2}+x^{2}\right ) y^{\prime }+\left (x -y\right ) y&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 28
ode:=(a^2+x^2)*diff(y(x),x)+(x-y(x))*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {a^{2}}{\sqrt {a^{2}+x^{2}}\, c_1 \,a^{2}-x} \]
Mathematica. Time used: 0.183 (sec). Leaf size: 37
ode=(x^2+a^2)*D[y[x],x]+(x-y[x])*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {a^2}{-x+a^2 c_1 \sqrt {a^2+x^2}}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.343 (sec). Leaf size: 46
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq((a**2 + x**2)*Derivative(y(x), x) + (x - y(x))*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {a^{3} \sqrt {1 + \frac {x^{2}}{a^{2}}}}{\sqrt {a^{2} + x^{2}} \left (C_{1} a^{3} \sqrt {1 + \frac {x^{2}}{a^{2}}} - x\right )} \]