29.5.27 problem 144

Internal problem ID [4744]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 5
Problem number : 144
Date solved : Tuesday, March 04, 2025 at 07:13:35 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 11
ode:=x*diff(y(x),x)+x^2-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left (-x +c_{1} \right ) x \]
Mathematica. Time used: 0.028 (sec). Leaf size: 13
ode=x D[y[x],x]+x^2-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (-x+c_1) \]
Sympy. Time used: 0.225 (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 ) \]