29.6.8 problem 154

Internal problem ID [4754]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 6
Problem number : 154
Date solved : Sunday, March 30, 2025 at 03:52:52 AM
CAS classification : [_linear]

\begin{align*} x y^{\prime }&=a x +b y \end{align*}

Maple. Time used: 0.002 (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.043 (sec). Leaf size: 22
ode=x D[y[x],x]==a x + b y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {a x}{1-b}+c_1 x^b \]
Sympy. Time used: 0.256 (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} \]