35.3.8 problem 8

Internal problem ID [6112]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 3. Linear First-Order Equations. page 403
Problem number : 8
Date solved : Sunday, March 30, 2025 at 10:39:05 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=x*ln(x)*diff(y(x),x)+y(x) = ln(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (x \right )}{2}+\frac {c_1}{\ln \left (x \right )} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 19
ode=(x*Log[x])*D[y[x],x]+y[x]==Log[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\log (x)}{2}+\frac {c_1}{\log (x)} \]
Sympy. Time used: 0.270 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*log(x)*Derivative(y(x), x) + y(x) - log(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{\log {\left (x \right )}} + \frac {\log {\left (x \right )}}{2} \]