69.1.51 problem 70

Internal problem ID [14133]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 70
Date solved : Monday, March 31, 2025 at 12:10:01 PM
CAS classification : [_Bernoulli]

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

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