24.1.6 problem 1(f)

Internal problem ID [4195]
Book : Elementary Differential equations, Chaundy, 1969
Section : Exercises 3, page 60
Problem number : 1(f)
Date solved : Sunday, March 30, 2025 at 02:42:16 AM
CAS classification : [_linear]

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

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