15.1.18 problem 18

Internal problem ID [2858]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 18
Date solved : Tuesday, March 04, 2025 at 02:51:37 PM
CAS classification : [_separable]

\begin{align*} y&=x y+x^{2} y^{\prime } \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=y(x) = x*y(x)+x^2*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \,{\mathrm e}^{-\frac {1}{x}}}{x} \]
Mathematica. Time used: 0.032 (sec). Leaf size: 23
ode=y[x]==x*y[x]+x^2*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {c_1 e^{-1/x}}{x} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.356 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*Derivative(y(x), x) - x*y(x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} e^{- \frac {1}{x}}}{x} \]