82.12.10 problem Ex. 10

Internal problem ID [18696]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Examples on chapter II at page 29
Problem number : Ex. 10
Date solved : Thursday, March 13, 2025 at 12:39:01 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} x y^{\prime }+\frac {y^{2}}{x}&=y \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 12
ode:=x*diff(y(x),x)+y(x)^2/x = y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {x}{\ln \left (x \right )+c_{1}} \]
Mathematica. Time used: 0.155 (sec). Leaf size: 19
ode=x*D[y[x],x]+y[x]^2/x==y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x}{\log (x)+c_1} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.212 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - y(x) + y(x)**2/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x}{C_{1} + \log {\left (x \right )}} \]