23.1.258 problem 252

Internal problem ID [4865]
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 : 252
Date solved : Tuesday, September 30, 2025 at 08:45:39 AM
CAS classification : [_separable]

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