15.5.1 problem 1

Internal problem ID [2937]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 9, page 38
Problem number : 1
Date solved : Sunday, March 30, 2025 at 01:00:12 AM
CAS classification : [_linear]

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

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