12.2.3 problem 3

Internal problem ID [1539]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Linear first order. Section 2.1 Page 41
Problem number : 3
Date solved : Tuesday, March 04, 2025 at 12:38:33 PM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 13
ode:=x*diff(y(x),x)+ln(x)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,{\mathrm e}^{-\frac {\ln \left (x \right )^{2}}{2}} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 23
ode=x*D[y[x],x] +Log[x]*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 e^{-\frac {1}{2} \log ^2(x)} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.289 (sec). Leaf size: 12
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} e^{- \frac {\log {\left (x \right )}^{2}}{2}} \]