35.9.2 problem 1, using elementary method

Internal problem ID [6237]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 12, Series Solutions of Differential Equations. Section 1. Miscellaneous problems. page 564
Problem number : 1, using elementary method
Date solved : Sunday, March 30, 2025 at 10:44:20 AM
CAS classification : [_separable]

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

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