78.8.47 problem 47

Internal problem ID [18174]
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 : Monday, March 31, 2025 at 05:21:47 PM
CAS classification : [_linear]

\begin{align*} x y+y-1+x y^{\prime }&=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.035 (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]
 
\[ y(x)\to \frac {1+c_1 e^{-x}}{x} \]
Sympy. Time used: 0.265 (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} \]