66.1.30 problem Problem 43

Internal problem ID [13806]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 43
Date solved : Monday, March 31, 2025 at 08:13:25 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

Maple. Time used: 0.002 (sec). Leaf size: 12
ode:=(x-y(x))*y(x)-x^2*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x}{\ln \left (x \right )+c_1} \]
Mathematica. Time used: 0.158 (sec). Leaf size: 19
ode=(x-y[x])*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}{\log (x)+c_1} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.194 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-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 {x}{C_{1} + \log {\left (x \right )}} \]