72.8.12 problem 12

Internal problem ID [19496]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 12
Date solved : Thursday, October 02, 2025 at 04:32:26 PM
CAS classification : [_linear]

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