23.1.269 problem 263

Internal problem ID [4876]
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 : 263
Date solved : Tuesday, September 30, 2025 at 08:46:01 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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