89.6.2 problem 2

Internal problem ID [24385]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Miscellaneous Exercises at page 45
Problem number : 2
Date solved : Thursday, October 02, 2025 at 10:22:51 PM
CAS classification : [_linear]

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