86.4.4 problem 4

Internal problem ID [23111]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 4. Linear equations of the first order. Exercise 4b at page 64
Problem number : 4
Date solved : Thursday, October 02, 2025 at 09:22:57 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\frac {y \ln \left (x \right )}{x}&=2 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 25
ode:=diff(y(x),x)+y(x)/x*ln(x) = 2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int 2 \,{\mathrm e}^{\frac {\ln \left (x \right )^{2}}{2}}d x +c_1 \right ) {\mathrm e}^{-\frac {\ln \left (x \right )^{2}}{2}} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 41
ode=D[y[x],x]+y[x]/x*Log[x]==2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-\frac {1}{2} \log ^2(x)} \left (\sqrt {\frac {2 \pi }{e}} \text {erfi}\left (\frac {\log (x)+1}{\sqrt {2}}\right )+c_1\right ) \end{align*}
Sympy. Time used: 0.487 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 2 + y(x)*log(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \frac {\log {\left (x \right )}^{2}}{2}} + \sqrt {2} \sqrt {\pi } e^{- \frac {\log {\left (x \right )}^{2}}{2} - \frac {1}{2}} \operatorname {erfi}{\left (\frac {\sqrt {2} \left (\log {\left (x \right )} + 1\right )}{2} \right )} \]