23.1.146 problem 147

Internal problem ID [4753]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 147
Date solved : Tuesday, September 30, 2025 at 08:30:32 AM
CAS classification : [_linear]

\begin{align*} x y^{\prime }+x^{2}-y&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 11
ode:=x*diff(y(x),x)+x^2-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-x +c_1 \right ) x \]
Mathematica. Time used: 0.016 (sec). Leaf size: 13
ode=x*D[y[x],x]+x^2-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x (-x+c_1) \end{align*}
Sympy. Time used: 0.133 (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 ) \]