23.1.157 problem 157

Internal problem ID [4764]
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 : 157
Date solved : Tuesday, September 30, 2025 at 08:30:49 AM
CAS classification : [_linear]

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