29.9.20 problem 260

Internal problem ID [4860]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 9
Problem number : 260
Date solved : Sunday, March 30, 2025 at 04:04:40 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.002 (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.161 (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.207 (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 )}} \]