69.12.31 problem 305

Internal problem ID [18184]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 12. Miscellaneous problems. Exercises page 93
Problem number : 305
Date solved : Thursday, October 02, 2025 at 03:08:12 PM
CAS classification : [_Bernoulli]

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

With initial conditions

\begin{align*} y \left (1\right )&={\frac {1}{2}} \\ \end{align*}
Maple. Time used: 0.043 (sec). Leaf size: 11
ode:=x*diff(y(x),x)+y(x) = y(x)^2*ln(x); 
ic:=[y(1) = 1/2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {1}{1+x +\ln \left (x \right )} \]
Mathematica. Time used: 0.096 (sec). Leaf size: 12
ode=x*D[y[x],x]+y[x]==y[x]^2*Log[x]; 
ic={y[1]==1/2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{x+\log (x)+1} \end{align*}
Sympy. Time used: 0.198 (sec). Leaf size: 10
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 = {y(1): 1/2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {1}{x + \log {\left (x \right )} + 1} \]