41.2.2 problem 2

Internal problem ID [8704]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 2
Date solved : Tuesday, September 30, 2025 at 05:41:58 PM
CAS classification : [_separable]

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