26.5.9 problem 12

Internal problem ID [4283]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, End of chapter, page 61
Problem number : 12
Date solved : Sunday, March 30, 2025 at 02:50:50 AM
CAS classification : [_linear]

\begin{align*} x^{2}+y&=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.027 (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.221 (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 ) \]