12.2.7 problem 7

Internal problem ID [1543]
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 : 7
Date solved : Saturday, March 29, 2025 at 10:58:18 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left ({\mathrm e}\right )&=1 \end{align*}

Maple. Time used: 0.035 (sec). Leaf size: 14
ode:=x*diff(y(x),x)+(1+1/ln(x))*y(x) = 0; 
ic:=y(exp(1)) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}}{\ln \left (x \right ) x} \]
Mathematica. Time used: 0.047 (sec). Leaf size: 18
ode=D[y[x],x] +(1+1/Log[x])*y[x]==0; 
ic=y[Exp[1]]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-\operatorname {LogIntegral}(x)+\operatorname {LogIntegral}(e)-x+e} \]
Sympy. Time used: 0.252 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + (1 + 1/log(x))*y(x),0) 
ics = {y(E): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e}{x \log {\left (x \right )}} \]