72.8.47 problem 47

Internal problem ID [19531]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 47
Date solved : Thursday, October 02, 2025 at 04:39:46 PM
CAS classification : [_linear]

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