40.3.11 problem 24 (p)

Internal problem ID [6615]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 5. Equations of first order and first degree (Exact equations). Supplemetary problems. Page 33
Problem number : 24 (p)
Date solved : Sunday, March 30, 2025 at 11:12:21 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} y \left (x -2 y\right )-x^{2} y^{\prime }&=0 \end{align*}

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