89.5.26 problem 25 (n=-1)

Internal problem ID [24376]
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. Exercises at page 43
Problem number : 25 (n=-1)
Date solved : Thursday, October 02, 2025 at 10:22:36 PM
CAS classification : [_linear]

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