78.8.12 problem 12

Internal problem ID [18139]
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 : Monday, March 31, 2025 at 05:13:22 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (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.032 (sec). Leaf size: 11
ode=x^2+y[x]==x*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (x+c_1) \]
Sympy. Time used: 0.217 (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 ) \]