62.12.27 problem Ex 28

Internal problem ID [12794]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 19. Summary. Page 29
Problem number : Ex 28
Date solved : Wednesday, March 05, 2025 at 08:31:57 PM
CAS classification : [_Bernoulli]

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

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