23.1.240 problem 235 (b)

Internal problem ID [4847]
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 : 235 (b)
Date solved : Tuesday, September 30, 2025 at 08:44:10 AM
CAS classification : [_separable]

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